Javascript Reference - HTML DOM documentMode Property








The documentMode property returns the mode used by the browser to render the current document.

Syntax

document.documentMode

Browser Support

The documentMode is an IE only property, supported in IE8+.

documentMode No Yes No No No

Example

The following code shows how to get the mode used by the browser to render the current document.


<!DOCTYPE html>
<html>
<body>
<script>
document.write(document.documentMode);
</script>
</body>
</html>

The code above is rendered as follows: