documentMode属性
1、定义和用法:
The documentMode property returns the mode used by the browsers to render the current document.
documentMode属性返回浏览器渲染当前文档所用的模式。
IE8 can render a page in different modes,depending on the !DOCTYPE or the presence of certain HTML elements.
IE8可以以不同的模式渲染一个页面,主要依赖于!DOCTYPE或者当前的某一个HTML元素。
按照下列的值返回:
5 ----- in IE5 mode7 ----- in IE7 mode8 ----- in IE8 mode9 ----- in IE9 mode
注释:
如果没有定义!DOCTYPE,IE8以IE5的模式来渲染页面
2、
语法:
document.documentMode
3、浏览器支持:
documentMode 是一个IE的私有属性,在IE8+中被支持。
扩展阅读:
http://www.w3schools.com/jsref/prop_doc_documentmode.asp