第一次用到这个,做个记录,在html页面中调用本地程序:
<html>
<head>
<script language="javascript">
function Run(strPath)
{
var objShell = new ActiveXObject("wscript.shell");
objShell.exec(strPath);
objShell = null;
}
</script>
</head>
<body>
请输入要运行的程序路径:<br>
<input name=exe type=text size=20 value="D:\\a.doc">
<BUTTON class=button onclick="Run(exe.value)">确定</BUTTON>
</body>
</html>