日期:2014-05-17  浏览次数:20715 次

页面上调用 windows 程序 (仅IE支持)
点击按钮 打开windsows 计算器
  <html>
  <head></head>
  <title>  </title>
  <SCRIPT   language=JavaScript>  
  function   Run(strPath)   {  
      try{  
              var objShell   =   new   ActiveXObject("wscript.shell");  
              objShell.Run(strPath);  
              objShell   =   null;  
          }catch (e){
  	alert('找不到文件"'+strPath+'"(或它的组件之一)。请确定路径和文件名是否正确,     而且所需的库文件均可用。')   
     }  
  }  
 </SCRIPT>
<body>
   <input type="button" value="button"   onclick="Run('C:/Windows/System32/calc.exe')"/>
  </body>
  </html>