JavaScript gets the IE version code:
var GIE = Getie ();
Alert (gie.version)
function Getie () {
var Rmsie =/(MSIE) ([\w.] +)/;
var ua = Navigator.userAgent.toLowerCase ();
var match = rmsie.exec (UA)
var result = {};
if (match && match.length > 0) {result
= {Browser:match[1] | | "", Version:match[2] | | " 0 "}
} return result
;
}
If the compatibility mode error is compatible with the IE version, you can use the following code:
<meta http-equiv= "x-ua-compatible" content= "ie=9;ie=8"/> <meta http-equiv=
"x-ua-compatible" content= "ie=9,8"/>
Specifies that the browser uses a specific document mode. Content has two ways of writing, which can be separated by ";" or "," and not in writing order, and the browser will select the highest version of the list that he supports to render using standard mode.
There is another way:
<meta http-equiv= "x-ua-compatible" content= "ie=edge,chrome=1"/>
This can be achieved if the GCF is installed, then use GCF to render the page, if the GCF is not installed, then use the highest version of the IE kernel for rendering. Google Chrome frame (google embedded browser framework GCF). This plugin can make the user's IE browser unchanged, but the user browsing the web, the actual use of Google Chrome browser kernel, and support IE6, 7, 8 and many other versions of IE browser.
The above is small series for everyone to bring JS get IE version number and HTML set IE document mode of the content of the method, I hope that we support cloud Habitat Community ~