[英]JavaScript, window.open, clean url's and Internet Explorer 10
[英]javascript window.open should open some urls in internet explorer
我有一种情况,我必须在 Internet Explorer 中打开一些网址。 默认情况下,用户可以在 chrome 或 edge 或 firefox 上浏览页面。 但是,如果页面上的某些链接被打开,它应该在 Internet Explorer 中打开它,因为这些页面取决于某些 IE 相关功能的功能。 我们如何在 javascript 中解决这个问题?
通常您无法选择打开的浏览器。 您唯一能做的就是在计算机上注册一个协议处理程序,并使用该协议。
https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-ph-install-registration
例如,您可能会注册如下内容:
internet-explorer://https://example.com
然后不要使用window.open()
(这可能不起作用),只需链接到这个 URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.