用Javascript调用Windows程序

<SCRIPT language=JavaScript>
function Run(){
try{
var objShell = new ActiveXObject("wscript.shell");
objShell.Run('mspaint');
objShell = null;
}
catch(e){
alert('找不到文件。')
}
}
</SCRIPT>
<button onclick="Run()">打开windows画图板</button>

你可能感兴趣的:(JavaScript)