Get IP address of your machine/computer Using JavaScript.
Copy and past this code in notepad and save ip.html. Click here to Download Demo .
Code:
- <!-- In few lines of Code get your Ip Address
- Author : Mohammad Usman
- date : 29/9/2011
- -->
- <html>
- <HEAD>
- <script type="application/javascript">
- function getip(json){
- alert("Your IP address is " +json.ip); // alerts the ip address
- }
- </script>
- <script type="application/javascript" src="http://jsonip.appspot.com/?callback=getip"></script>
- </HEAD>
- <body>
- <div id="ip">
- <h1 style="text-align:center;">Thanks for getting IP.</h1>
- </div>
- </body
- </html>
This very easy & useful way to findout the ip address.I am new in java script so it is like water in desert to me..............THANKS.
ReplyDelete