Posted in Javascript onAugust 02, 2013
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>无标题页</title> <script type="text/javascript"> function getClientPcName() { var WshShellPcName = new ActiveXObject("WScript.Network"); var ComputerName = WshShellPcName.ComputerName ; return ComputerName; } function getClientIp() { var WshShellIp = new ActiveXObject("rcbdyctl.Setting"); var ip = WshShellIp.GetIPAddress; return ip; } alert(getClientPcName()+" "+getClientIp()); </script> </head> <body> </body> </html>
在vs中还可以用,发布到IIS下面就不行了,请高手提示。
js获取IP和PcName(IE)在vs中可用
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@