JavaScript document.documentMode Property

You are Here:

JavaScript document.documentMode Property

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

Note: This property works only on Internet Explorer.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <p>you are using IE<span id="point"></span></p> <script> var x = document.getElementById("point"); x.innerHTML = document.documentMode; </script> </body> </html>

Syntax

document.documentMode

Return Values

Returns the mode used by the browser to render the current document.

ValueExplanation
5The page is displayed in IE5 mode
7The page is displayed in IE7 mode
8The page is displayed in IE8 mode
9The page is displayed in IE9 mode
10The page is displayed in IE10 mode
11The page is displayed in IE11 mode

Reminder

Hi Developers, we almost covered 97% of JavaScript Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in JavaScript.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author