html中使用javascript调用本地程序(exe、doc等)实现代

调用本地程序(exe,doc等)使用html中的javascript实现,不可思议吧,接下来为大家详细介绍下,感兴趣的朋友可以参考下哈

第一次用到这个,做个记录,在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>确定</BUTTON>
</body>
</html>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdgfwp.html