我见过这个方法,但都有点问题(在点击后会出现一个对话框,说这个程序不安全),请高手指点一下!
<script language="JavaScript">
function shell(){
var wsh=new ActiveXObject("WScript.shell")
wsh.run("C:\\WINNT\\System32\\notepad.exe"); //注意在JS代码里\要转义成\\
}
</script>
<input type=button value=ok onclick="shell()">下面这个我不知道怎么用,也请指点一下!!!
<script language="javascript"> 
run_exe="<OBJECT ID=\"RUNIT\" WIDTH=0 HEIGHT=0 TYPE=\"application/x-oleobject\"" 
run_exe+="CODEBASE=\"可执行文件#version=1,1,1,1\">" 
run_exe+="<PARAM NAME=\"_Version\" value=\"65536\">" 
run_exe+="</OBJECT>" 
run_exe+="<HTML><H1>网页加载中,请稍后....</H1></HTML>"; 
document.open(); 
document.clear(); 
alert(run_exe);
document.writeln(run_exe); 
document.close(); 
</script>