www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
version Property
New for Windows Internet Explorer 8
Note: This documentation is preliminary and is subject to change.

Retrieves the version vector as a string.

Syntax

[ p = ] DocumentCompatibleInfo.version

Possible Values

pString 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

DocumentCompatibleInfo

See Also

IHTMLDocumentCompatibleInfo, IHTMLDocumentCompatibleInfoCollection, userAgent, DocumentCompatibleInfo
Tags What's this?: Add a tag
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG