检测IE10兼容模式 [英] Detect IE10 compatibility mode

查看:129
本文介绍了检测IE10兼容模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为IE 10和其他IE版本提供了一些特定的代码路径。如果IE10在兼容模式下运行,则浏览器版本将设置为7.0。有没有一种方法可以检测出它是否是IE 10,而不考虑使用JavaScript / JQuery的标准/兼容模式?

三叉戟值在用户代理字符串中表示正在运行的IE的实际版本。


I have some specific code paths for IE 10 and rest of the IE versions. If IE10 is running in compatibility mode, browser version is set to 7.0. Is there a way to detect if it is IE 10 irrespective of the standard/compatibility mode using JavaScript/JQuery?

解决方案

Trident value in the user agent string indicates the actual version of IE being run.

这篇关于检测IE10兼容模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆