I want to create a link that a user can click which will create a popup
telling the user their ip address. I have:
var ip = new java.net.InetAd dress.getLocalH ost().toString( );
alert("Your IP address is: " + ip.substring(ip .indexOf("/")+1))
but this does not seem to work. It says the ip is 127.0.0.1. Strangely,
this piece of code used to work but all of a sudden it doesn't for some
unknown reason. Can anyone tell me what's wrong with the above code?
Lowell
telling the user their ip address. I have:
var ip = new java.net.InetAd dress.getLocalH ost().toString( );
alert("Your IP address is: " + ip.substring(ip .indexOf("/")+1))
but this does not seem to work. It says the ip is 127.0.0.1. Strangely,
this piece of code used to work but all of a sudden it doesn't for some
unknown reason. Can anyone tell me what's wrong with the above code?
Lowell
Comment