简体   繁体   English

在Firefox和Chrome中访问ActiveX对象

[英]Access ActiveX objects in Firefox and Chrome

I have a situtaion where i need the command prompt to open on the click of a button. 我有一个场景,单击按钮需要打开命令提示符。 for this i started of by usign jsp. 为此,我由usign jsp开始。

 var wsh = new ActiveXObject('WScript.Shell'); command = "cmd /k D:\\ & cd testTrial & trial.bat & echo DONE!" wsh.Run(command); 

The problem is that this wont run in firefox as ActiveXObject is a Microsoft propritory. 问题在于,由于ActiveXObject是Microsoft的专长,因此无法在firefox中运行。 Is there a way i can check the browser and then run the above code keeping the current browser in mind. 有没有一种方法可以检查浏览器,然后在运行上述代码时牢记当前的浏览器。

这听起来像一个安全漏洞...我认为您将无法做到这一点。

据我所知,出于安全原因,其他浏览器不允许访问本地资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM