gpt4 book ai didi

javascript window.open 应该在 Internet Explorer 中打开一些网址

转载 作者:行者123 更新时间:2023-12-02 22:32:43 25 4
gpt4 key购买 nike

我遇到一种情况,我必须在 Internet Explorer 中打开一些网址。默认情况下,用户可以在 chrome、edge 或 firefox 上浏览页面。但是,如果打开页面上的某些链接,则应在 Internet Explorer 中打开它,因为这些页面取决于某些 IE 相关功能的功能。我们如何在 JavaScript 中实现这一点?

最佳答案

通常您无法选择打开哪个浏览器。您唯一能做的就是在计算机上注册协议(protocol)处理程序并使用该协议(protocol)。

https://learn.microsoft.com/en-us/windows/win32/search/-search-3x-wds-ph-install-registration

例如,您可以注册如下内容:

internet-explorer://https://example.com

然后,不要使用 window.open()(这可能不起作用),只需链接到此 URL。

关于javascript window.open 应该在 Internet Explorer 中打开一些网址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58842166/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com