0

i would like to run .exe files on my computer from my website,
example:

 <script type="text/javascript" language="javascript">  
    function RunFile() {  
    WshShell = new ActiveXObject("WScript.Shell");  
    WshShell.Run("c:/windows/system32/notepad.exe", 1, false);  
    }  
</script>  

<input type="button" value="Run Notepad" onclick="RunFile();"/>

I googled this and its seems its only possible in IE so i wonder if its possible to do this in all browsers with some sort of application like BF3 or something, a handler of some sort .dll or whatever they use. I will not abuse this, i can assure you i will only use it for my personal usage and with some friends. I want a html file that can open desktop icons.

4

2 回答 2

1

无法从网页启动本地应用程序。正如您毫无疑问地推测的那样,滥用它太容易了。

于 2012-11-04T03:50:50.820 回答
1

它既ActiveXObject不是 HTML DOM 也不是 JavaScript/ECMAScript 标准的一部分。它仅适用于 Microsoft Internet Explorer (MSIE)。MSIE for Mac 也可能缺乏对 ActiveX 的支持,ActiveXObject因为 ActiveX 起源于 Window 平台。

于 2012-11-04T03:39:22.340 回答