Gets a value that indicates whether standards-compliant mode is switched on for the object.
Syntax
[ sMode = ] object.compatMode
Possible Values
sMode |
String that receives one of the following values.
BackCompat Standards-compliant mode is not switched on.
CSS1Compat Standards-compliant mode is switched on.
|
The property is read-only. The property has no default value.
Remarks
With Microsoft Internet Explorer 6 and later, you switch on standards-compliant mode by including the !DOCTYPE declaration at the top of your document, specifying a valid Label in the declaration, and in some cases, specifying the Definition or URL. The Label element specifies the unique name of the Document Type Definition (DTD), and can be appended with the version number of the DTD. The Definition element specifies the definition of the DTD that is specified in the Label. The URL element specifies the location of the DTD.
When standards-compliant mode is switched on (also called "strict mode"), Windows Internet Explorer displays the document according to the World Wide Web Consortium (W3C) Cascading Style Sheets (CSS) standard. When standards-compliant mode is not switched on (also called "quirks mode"), the document is displayed as it was displayed in previous versions of Internet Explorer.
The compatMode property is deprecated in Internet Explorer 8 in favor of the documentMode property.
IE8 documentMode
Syntax
[ vMode = ] object.documentMode
Possible Values
vMode |
Floating-point that receives one of the following values.
5 Microsoft Internet Explorer 5 mode (also known as "quirks mode").
7 Internet Explorer 7 Standards mode.
8 Internet Explorer 8 Standards mode.
|
The property is read-only. The property has no default value.
Remarks
This property is available in all compatibility modes.
The document compatibility mode of a Web page determines how Internet Explorer 8 interprets and renders the page. Page 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 Internet Explorer previous to Internet Explorer 8, compatMode was solely determined by DOCTYPE.