<div class="codetitle"> <span><a style="CURSOR: pointer" data="15006" class="copybut" id="copybut15006" onclick="doCopy('code15006')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code15006"> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml"> <br><head> <br><title>无标题页</title> <br><script type="text/javascript"> <br>function getClientPcName() <br>{ <br>var WshShellPcName = new ActiveXObject("WScript.Network"); <br>var ComputerName = WshShellPcName.ComputerName ; <br>return ComputerName; <br>} <br><br><br>function getClientIp() <br>{ <br>var WshShellIp = new ActiveXObject("rcbdyctl.Setting"); <br>var ip = WshShellIp.GetIPAddress; <br>return ip; <br>} <br>alert(getClientPcName() " " getClientIp()); <br></script> <br></head> <br><body> <br></body> <br><br></html> <br> </div> <br>在vs中还可以用,发布到IIS下面就不行了,请高手提示。