可能重複:
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