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?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- How to fix IE ClearType + jQuery opacity problem i
- void before promise syntax
Trident value in the user agent string indicates the actual version of IE being run.
This is what I use from JQuery .ready
Ben Hobgood
You can detect this using the
navigator.userAgent
string, for exampleTrident/6.0 means IE10
MSIE 7.0 means compatibility mode
More details: https://stackoverflow.com/a/5825518/255654
This should work detect compatibility mode for MSIE.
iecheck.js
iecheck.html