可能重复:
Can I lookup the IP address of a hostname from javascript?获得域名的IP使用JavaScript
你能在脚本运行的当前页面的IP地址? 我可以使用var domain = document.domain;
获取当前文档的域名。 在PhP中,您可以使用功能gethostbyname($domain)
获取域的IP地址; JS中有这个函数的替代吗?
可能重复:
Can I lookup the IP address of a hostname from javascript?获得域名的IP使用JavaScript
你能在脚本运行的当前页面的IP地址? 我可以使用var domain = document.domain;
获取当前文档的域名。 在PhP中,您可以使用功能gethostbyname($domain)
获取域的IP地址; JS中有这个函数的替代吗?
看吧:How to find out the server ip address (using javascript) that the browser is connected to?
有没有办法做到这一点在JavaScript中,除非该网站是通过一个IP地址acessed,在这种情况下,你可以看着host.location
财产。
,如果你有Java小程序的知识,那么你就可以在客户机上获取IP,你可以在你的隐藏字段中填入IP和你的JavaScript
http://stackoverflow.com/questions/2523574/利用从客户端浏览器确定ip-of-domain- – 2011-02-09 12:02:15