Get IP Address of Your Machine using JavaScript.


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:
  1. <!-- In few lines of Code get your Ip Address
  2.     Author : Mohammad Usman
  3.     date    : 29/9/2011
  4. -->
  5. <html>
  6. <HEAD>
  7. <script type="application/javascript">
  8.     function getip(json){
  9.       alert("Your IP address is " +json.ip); // alerts the ip address          
  10.     }
  11. </script>
  12. <script type="application/javascript" src="http://jsonip.appspot.com/?callback=getip"></script>
  13. </HEAD>
  14. <body>
  15. <div id="ip">
  16.     <h1 style="text-align:center;">Thanks for getting IP.</h1>
  17. </div>
  18. </body
  19. </html>

1 comment:

  1. 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

Comment On Facebook