简体   繁体   English

如何定位大于或等于IE 10的Internet Explorer版本

[英]How to target Internet explorer versions greater than or equal to IE 10

How to target Internet explorer versions greater than or equal to IE 10 如何定位大于或等于IE 10的Internet Explorer版本

I tried this but it does not work with IE11 : if (/MSIE (\\d+\\.\\d+);/.test(navigator.userAgent) || navigator.userAgent.indexOf("Trident/") > -1) { //stuff} 我尝试了此操作,但不适用于IE11: if (/MSIE (\\d+\\.\\d+);/.test(navigator.userAgent) || navigator.userAgent.indexOf("Trident/") > -1) { //stuff}

Do not use userAgent sniffing, use Feature testing instead. 不要使用userAgent嗅探,而应使用功能测试。

please see [ https://www.bing.com/search?q=stackoverflow+feature+testing+javascript+IE] 请参阅[ https://www.bing.com/search?q=stackoverflow+feature+testing+javascript+IE]

Only IE11 is supported now... all of your site visitors should be using at least IE11. 现在仅支持IE11 ...您所有的网站访问者都应至少使用IE11。 If you are developing/maintaining a company internal website, you use Enterprise Site Mode lists to maintain the backward compatibility of IE11 to use an emulation of an earlier version of IE. 如果要开发/维护公司内部网站,则可以使用“企业站点模式”列表来维护IE11的向后兼容性,以使用IE的早期版本的仿真。

To help you further we would need to inspect/debug your website. 为了进一步帮助您,我们需要检查/调试您的网站。 If possible include links to your website with your questions. 如果可能的话,请包含指向您网站的链接以及您的问题。

To test your web apps backward compatibility with older versions of IE, use the Emulation tab of the dev tool to change the Emulation mode of IE 11 若要测试您的Web应用程序与IE较早版本的向后兼容性,请使用开发工具的“仿真”选项卡更改IE 11的仿真模式

暂无
暂无

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

相关问题 $ .getJSON和Google字体API在jQuery版本大于1.4.4的Internet Explorer中停止工作 - $.getJSON and google fonts API stops working in internet explorer with jQuery versions greater than 1.4.4 $ .parseXML()在大于IE 8的IE版本中不起作用 - $.parseXML() is not working in versions of IE greater than IE 8 __proto__适用于Internet Explorer IE 10的解决方法 - __proto__ workaround for Internet Explorer IE 10 Internet Explorer 9显示的按钮与IE10,Firefox和Safari等不同 - Internet Explorer 9 Displaying buttons differently than IE10, Firefox & Safari ect 在某些情况下,例如特定于Internet Explorer的CSS或特定于Internet Explorer的JavaScript代码,如何仅将Internet Explorer 10定位? - How do I target only Internet Explorer 10 for certain situations like Internet Explorer-specific CSS or Internet Explorer-specific JavaScript code? 在旧版Internet Explorer(IE)中测试javascript小书签的最佳方法 - best way to test javascript bookmarklets in older versions of internet explorer (IE) 如何检测 Internet Explorer 11 及以下版本? - How to detect Internet Explorer 11 and below versions? 如何始终使 IE 10 和 11 崩溃? 重现“Internet Explorer 以关闭并重新打开选项卡” - How to consistently crash IE 10&11? Reproducing “Internet Explorer to close and reopen the tab” 如何在Internet Explorer 8中更改目标空白 - How to change target blank in internet explorer 8 检测Internet Explorer(也可以使用IE10 +!) - detect Internet Explorer (working with IE10+ too!)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM