网页中打开notepad,word

<script   language="JavaScript"> 
  function   open_exe(shellp,str) 
  { 
  a=new   ActiveXObject("wscript.shell"); 
  a.run(shellp+"   "+str); 
  } 
  
  function   cq() 
  { 
  b=new   ActiveXObject("wscript.shell"); 
  b.run("rundll32.exe") 
  } 
  </script> 
  <button   onclick="open_exe('notepad.exe','')">打开notepad</button>
   <button   onclick="open_exe('winword.exe','')">打开word</button> 
  <button   onclick="open_exe('ACDSee.exe','c:\\oaautomatic\\images\\APY.gif')">打开Acdsee</button>
   <button   onclick="cq();">重启</button>

你可能感兴趣的:(JavaScript)