复制代码 代码如下:
<!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下面就不行了,请高手提示。
时间: 2024-09-17 17:38:29