version
all
alt
ch
dir
for
id
low
min
rel
top
url
URL
urn
TOC
Collapse the table of content
Expand the table of content

version property

Retrieves the version vector as a string.

Internet Explorer 8

 

Syntax

JavaScript

p = object.version

 

Property values

Type: String

the version vector.

Remarks

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. Windows 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.

The minimum version is 5.

Examples


<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>


See also

Reference
IHTMLDocumentCompatibleInfo
IHTMLDocumentCompatibleInfoCollection
userAgent
DocumentCompatibleInfo

 

 

Show:
© 2016 Microsoft