Note: This documentation is preliminary and is subject to change.
Retrieves the version vector as a string.
Syntax
[ p = ] DocumentCompatibleInfo.version
Possible Values
p | String that
receives
the version vector.
|
The property is read-only.
The property has no default value.
Remarks
The minimum version is 5.
The version vector is composed of the major browser version number,
and up to 4 digits that specify the minor browser version number.
A decimal point separates the major and minor browser numbers.
Microsoft Internet Explorer versions are often expressed in "dotted decimal" notation, for example: 8.0.4.5.3.
The version vector 8.0453 is equivalent to the dotted decimal 8.0.4.5.3.
The version vector 8.5 is equivalent to 8.5000.
Example
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
</head>
<body>
<script type="text/javascript">
document.write("This document is in IE '" + document.documentMode + "' mode <br/>");
document.write("compatMode = '" + document.compatMode + "' <br/>");
document.write("document.compatible.length = '" + document.compatible.length + "' <br/>");
for(i = 0; i < document.compatible.length; i++){
document.write( i + " userAgent = " + document.compatible(i).userAgent + " <br/>");
document.write( i + " version = " + document.compatible(i).version + " <br/>");
}
</script>
<pre>
This example displays this output:
This document is in IE '8' mode
compatMode = 'CSS1Compat'
document.compatible.length = '1'
0 userAgent = IE
0 version = 8
</pre>
</body>
</html>
Applies To
See Also
IHTMLDocumentCompatibleInfo, IHTMLDocumentCompatibleInfoCollection, userAgent, DocumentCompatibleInfo