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 );

3 thought on “How to get the IP Address in Javascript”

Leave a Reply