Return the mode used by the browser to render the current document:
The result of x could be:
More "Try it Yourself" examples below.
The documentMode property returns the mode used by the browser to render the current document.
IE8 can render a page in different modes, depending on the !DOCTYPE or the presence of certain HTML elements.
This property returns one of following values:
Note: If no !DOCTYPE is specified, IE8 renders the page in IE5 mode!
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
documentMode | Not supported | 8.0 | Not supported | Not supported | Not supported |
Note: The documentMode is an IE only property.