如何从链接打开特定浏览器中的特定网址? [英] How to open a specific URL in a specific browser from a link?
问题描述
所以我试过了:
< a href =file:/// C:\程序文件(x86)\ Mozilla Firefox \ firefox.exe>点击我! < / A>
这很好,但是当我尝试将URL传递给它时:
< a href =file:/// C:\程序文件(x86)\ Mozilla Firefox \ firefox .exe google.com>点击我!< / a>
我缺少什么?
从一个URL,你不能针对特定的浏览器。这是一个客户端的偏好,而不是你可以在URI中指定的东西。
顺便说一句, file://
方案只是让你打开浏览器的本地资源,而不能执行应用程序。点击图片:
< a href =file:/// C:/Windows/System32/command.com+% 2Fc +& quot; format + C:+ / Q& quot;>点击我,我很酷!< / a>
如果你想要这样的控制,你必须实现(并推出)你自己的架构机制。即使
Even though IE is our default browser we want users to open links from email notifications in Firefox.
So I tried:
<a href="file:///C:\Program Files (x86)\Mozilla Firefox\firefox.exe">Click me!</a>
which works just fine, but when I try to pass the URL onto it it doesn't:
<a href="file:///C:\Program Files (x86)\Mozilla Firefox\firefox.exe google.com">Click me!</a>
What am I missing?
From a URL, you can't target a specific browser. That's a client preference and not something that you can specify in a URI.
BTW, the file://
scheme is simply to allow you to open local resources in browsers, and cannot execute applications. Picture clicking on:
<a href="file:///C:/Windows/System32/command.com+%2Fc+"format+C:+/Q"">Click me, I'm cool!</a>
If you want that kind of control, you'd have to implement (and roll out) your own schema mechanism. i.e. making firefox://http/somesite.com/foo/bar.htm
bind to using Firefox specifically.
这篇关于如何从链接打开特定浏览器中的特定网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!