js获取IP和PcName(IE)在vs中可用_javascript技巧: 代码如下: 无标题页 function getClientPcName() { var WshShellPcName = new ActiveXObject(WScript.Network); var ComputerName = WshShellPcName.ComputerName ; return ComputerName; }
导读js获取IP和PcName(IE)在vs中可用_javascript技巧: 代码如下: 无标题页 function getClientPcName() { var WshShellPcName = new ActiveXObject(WScript.Network); var ComputerName = WshShellPcName.ComputerName ; return ComputerName; }
代码如下:
无标题页
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>
在vs中还可以用,发布到IIS下面就不行了,请高手提示。
js获取IP和PcName(IE)在vs中可用_javascript技巧
js获取IP和PcName(IE)在vs中可用_javascript技巧: 代码如下: 无标题页 function getClientPcName() { var WshShellPcName = new ActiveXObject(WScript.Network); var ComputerName = WshShellPcName.ComputerName ; return ComputerName; }