简体   繁体   English

使用JavaScript打开Mozilla Firefox浏览器

[英]Open Mozilla Firefox Browser using JavaScript

My Application would default start with Google Chrome. 默认情况下,我的应用程序将从Google Chrome浏览器开始。 When User access one of the Menu Option , I would like to Open 当用户访问菜单选项之一时,我想打开

That URL with Mozilla Firefox Browser. Mozilla Firefox浏览器的URL。 Not Google Chrome. 不是谷歌浏览器。

Can someone please help me on the same? 有人可以帮我吗? Is this possible to Open explicit browser from JavaScript? 是否可以从JavaScript打开显式浏览器?

Thanks , Niraj Salot. 谢谢Niraj Salot。

Which browser is opened is dependant on the users OS (if the browser is present, which browser is their primary etc etc), as such it's not something that can be done through a browser. 哪个浏览器打开取决于用户的操作系统(如果存在浏览器,哪个浏览器是他们的主要浏览器等),因此,这不是可以通过浏览器完成的操作。

It would also be a massive security risk as if a browser could open an external application it would be open to exploits and abuses pretty much from the get go. 这也将带来巨大的安全风险,好像浏览器可以打开一个外部应用程序一样,一开始它就很容易受到攻击和滥用。

About the only permissiable way would be create a plug-in for Chrome which could request from the user if they would like to open the link in another browser, but then thats a alot of work for this. 大约唯一允许的方法是为Chrome创建一个插件,该插件可以向用户请求是否要在另一个浏览器中打开链接,但这需要大量工作。

You'd be better off checking what browser is being used (again since you have no control over which one the users are using) and politely ask that they open the link in firefox. 您最好检查一下正在使用哪种浏览器(再次,因为您无法控制用户使用的是哪种浏览器),并礼貌地要求他们在firefox中打开链接。

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

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