【发布时间】:2018-01-31 07:18:29
【问题描述】:
我想通过我正在使用此代码的 Web 应用程序在桌面上安装应用程序。但仅在 IE 中支持。我想在 firefox 或 Chrome 中打开它
<html>
<head>
<title>Application Executer</title>
<HTA:APPLICATION ID="oMyApp" APPLICATIONNAME="Application Executer" BORDER="no" CAPTION="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" SCROLL="no" WINDOWSTATE="normal">
<script type="text/javascript" language="javascript">
function RunFile()
{
WshShell = new ActiveXObject("WScript.Shell");
//call file
WshShell.Run("C:/MathType.exe", 1, false);
}
</script>
</head>
<body>
<input type="button" value="Run Notepad" onclick="RunFile();"/>
</body>
</html>
【问题讨论】:
-
我不认为你可以。 JS 在沙盒环境中运行。
标签: javascript jquery html