脚本实现Cmd.exe窗体的调用

<script>  
  function   runExe(sPath)  
  {  
  var   oShell   =   new   ActiveXObject("WScript.Shell");  
  try  
  {  
  oShell.Run(sPath);  
  }  
  catch(e)  
  {  
  document.write("Error   Exec   Notepad");  
  }  
  }  
  </script>  
  <a   href="javascript:"   onclick="runExe('Notepad.exe');">
打开记事本</a>  


可以传Telnet.exe,ping.exe等控制.
posted @ 2007-06-19 12:57  无边落木  阅读(448)  评论(1编辑  收藏  举报