取得客户端的机器名,域名,登陆用户名...<转>

<script   language=javascript>  
  var   WshShell   =new   ActiveXObject("WScript.Shell");  
  alert("计算机名   =   "+   WshShell.ExpandEnvironmentStrings("%COMPUTERNAME%"));  
  alert("登录用户名   =   "+   WshShell.ExpandEnvironmentStrings("%USERNAME%"));  
  </script>  
   
  <script   language=javascript>  
  var   wshNetwork   =   new   ActiveXObject("WScript.Network");  
  alert("域名               =   "+   wshNetwork.UserDomain);  
  alert("计算机名       =   "+   wshNetwork.ComputerName);  
  alert("登录用户名   =   "+   wshNetwork.UserName);  
  </script>
posted @ 2007-08-14 10:03  陋室  阅读(470)  评论(2编辑  收藏  举报