documentMode property
Retrieves the document compatibility mode of the document.
![]() |
Syntax
| JavaScript | |
|---|
Property values
Type: Variant
Variant of type Floating-point that receives one of the following values.
-
Internet Explorer 5 mode (also known as "quirks mode").
-
Internet Explorer 7 Standards mode.
-
Internet Explorer 8 Standards mode.
-
Internet Explorer 9 Standards mode.
-
Internet Explorer 10 Standards mode.
Remarks
When the current document has not yet been determined, documentMode returns a value of zero (0). This usually happens when a document is loading. When a return value of zero is received, try to determine the document compatibility mode at a later time.
This property is available in all compatibility modes.
The document compatibility mode of a document determines how Internet Explorer 8 interprets and renders the document. Document authors generally use meta elements to specify X-UA-Compatible http-equiv headers that specify the document compatibility mode. For more information, see Defining Document Compatibility.
In versions of Windows Internet Explorer previous to Internet Explorer 8, compatMode was solely determined by doctype.
See also
- document
- Reference
- compatible
- Conceptual
- Defining Document Compatibility
