How to Find and Detect IP Address Using Javascript

By | August 24, 2015

728x90-popads_1

How to Find and Detect IP Address Using Javascript

In this short article I will explain how to detect / find the IP Address of the client / user machine using JavaScript & jQuery.

You can use it in several places where you need to store IP Address of Client to Track the Users.

Above I have added an HTML <span> tag which will display the IP Address of the client machine. To get the IP Address I am making a JSON call to the Free Web Servicehttp://jsonip.appspot.com/ and I am passing the name of the callback function which will be called on completion of the request.
When the request is completed the IP address present in the response object is displayed in the HTML <span> tag.
Demo: How to Find and Detect IP Address Using Javascript
live_demo_button.fw_
The above code has been tested in the following browsers.
Internet Explorer  FireFox  Chrome  Safari  Opera
* All browser logos displayed above are property of their respective owners.

728x90-popads_1