How to get the IP Address in Javascript

To get the IP Address in Javascript you can use REMOTE_ADDR

Sample Javascript

var ipAddress = '<!--#echo var="REMOTE_ADDR"-->';
document.write("My IP-Address is" + ipAddress );

Please Share us:
Please rate this snippet

3 thoughts on “How to get the IP Address in Javascript

Leave a Reply