復制代碼 代碼如下:
<!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下面就不行了,請高手提示。