The documentMode
property returns the mode used
by the browser to render the current document.
document.documentMode
The documentMode is an IE only property, supported in IE8+.
documentMode |
No | Yes | No | No | No |
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: