document.compatMode介绍
2013-01-04 16:00
309 查看
document.compatMode 检查当前的文档渲染模式
返回值:BackCompat和CSS1Compat;
IE对两种模式渲染差别很大;
BackCompat: Standards-compliant mode is not switched on. (Quirks Mode) //默认模式
CSS1Compat: Standards-compliant mode is switched on. (Standards Mode) //标准模式
例子:
alert(document.body.clientWidth + '-' + document.documentElement.clientWidth + '-' + document.compatMode);
document.body.clientWidth ==> BODY对象宽度
document.body.clientHeight ==> BODY对象高度
document.documentElement.clientWidth ==> 可见区域宽度(Quirks Mode不兼容)
document.documentElement.clientHeight ==> 可见区域高度([b]Quirks Mode不兼容)[/b]
IE标准模式下 clientWidth 和 scrollWidth值相同;
返回值:BackCompat和CSS1Compat;
IE对两种模式渲染差别很大;
BackCompat: Standards-compliant mode is not switched on. (Quirks Mode) //默认模式
CSS1Compat: Standards-compliant mode is switched on. (Standards Mode) //标准模式
例子:
alert(document.body.clientWidth + '-' + document.documentElement.clientWidth + '-' + document.compatMode);
document.body.clientWidth ==> BODY对象宽度
document.body.clientHeight ==> BODY对象高度
document.documentElement.clientWidth ==> 可见区域宽度(Quirks Mode不兼容)
document.documentElement.clientHeight ==> 可见区域高度([b]Quirks Mode不兼容)[/b]
IE标准模式下 clientWidth 和 scrollWidth值相同;
相关文章推荐
- document.compatMode的CSS1compat使用介绍
- document.compatMode介绍
- document.compatMode介绍
- document.compatMode介绍
- 关于document.compatMode的一些介绍
- document.compatMode介绍
- 【转】document.compatMode介绍
- document.compatMode介绍
- document.compatMode的CSS1compat使用介绍
- document.compatMode介绍
- 关于document.compatMode的一些介绍
- javascript document.compatMode介绍
- document.compatMode解决兼容问题
- document.compatMode
- document.compatMode属性
- document.compatMode
- document.compatMode属性
- javascript document.compatMode兼容性
- document.compatMode属性
- 前端面霸系列(1):doctype 、Quirks Mode & Standards Mode 、document.compatMode