In this short article I will explain how to detect / find the IP Address of the client / user machine using JavaScript & jQuery.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
    window.onload = function () {
        var script = document.createElement("script");
        script.type = "text/javascript";
        script.src = "https://api.ipify.org?format=jsonp&callback=DisplayIP";
        document.getElementsByTagName("head")[0].appendChild(script);
    };
    function DisplayIP(response) {
        document.getElementById("ipaddress").innerHTML = "Your IP Address is " + response.ip;
    }
</script>
</head>
<body>
    <form>
        <span id = "ipaddress"></span>
    </form>
</body>
</html>
 
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 Service https://api.ipify.org?format=jsonp&callback=DisplayIP 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

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.