【发布时间】:2012-12-09 21:30:58
【问题描述】:
我使用这个代码:
<script>
function LaunchApp() {
if (!document.all) {
alert("Available only with Internet Explorer.");
return;
}
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("C:\\Windows\\notepad.exe");
}
<a href="javascript:LaunchApp()">Launch the executable</a>
但这不起作用。 (链接被禁用)
【问题讨论】:
-
您需要在 IE 中具有非常特定的权限才能使其正常工作..
-
@SimonWhitehead:IE 中的具体权限是什么?请帮帮我
-
@nas105 我重新标记了您的问题。这与 ASP.NET、.NET 或 C# 无关。这是关于 JScript 和 IE 的。
标签: javascript internet-explorer wsh jscript