Angular 在html中执行calc.exe
我正在尝试在html中执行calc.exeAngular 在html中执行calc.exe,angular,Angular,我正在尝试在html中执行calc.exe <button onclick="window.open('file:\\\C:\Windows\System32\calc.exe')"> Open </button> <a href = "C:\Windows\System32\calc.exe"> go </a> 打开 但我不能这么做 我看到了“ActiveX”,但这只是针对IE,我需要在Chrome中启动calc.exe,IE
<button onclick="window.open('file:\\\C:\Windows\System32\calc.exe')">
Open
</button>
<a href = "C:\Windows\System32\calc.exe"> go </a>
打开
但我不能这么做
我看到了“ActiveX”,但这只是针对IE,我需要在Chrome中启动calc.exe,IE、Mozilla和“Angular6”或JS或Jquery,我如何才能做到这一点?谢谢。不,您不能这样做,因为这将是一个巨大的安全漏洞,允许网站在您的操作系统级别执行命令。我建议使用electron或您自己编写解决方案。对于自己的解决方案,我指的是任何语言的本地服务器应用程序,它接收web请求(wss、rest…)并在您的机器上执行命令。不可能。Exe永远不能通过web运行。您可以使用electron与操作系统程序通信。浏览器不允许您使用。