woo... I try it in my iphone.
Upload the script to server first.
If I use GPS. It's work. I can check the latitude and longitude. (browser: Safari)
I also try it in my tablet. It's work. (browser: unknown and firefox)
However, my desktop is not work. (browser:Chrome and firefox) Somebody said desktop can use ip address to estimate latitude and longitude. But it seems to be wrong.