document.compatMode == "CSS1Compat"
2013-01-21 14:51
387 查看
var width = window.innerWidth; var height = window.innerHeight; if(typeof width != "Number"){ // IE width = document.compatMode == "CSS1Compat" ? document.documentElement.clientWidth : document.body.clientWidth; height = document.compatMode == "CSS1Compat" ? document.documentElement.clientHeight : document.body.clientHeight; } alert(width + "-------" + height)
相关文章推荐
- artDialog Error: document.compatMode === "BackCompat"
- document.body和document.documentElement,document.compatMode的关系
- document.compatMode
- document.compatMode介绍
- document.compatMode属性
- document.compatMode属性
- 前端面霸系列(1):doctype 、Quirks Mode & Standards Mode 、document.compatMode
- document.compatMode介绍
- document.compatMode的用法
- document.compatMode简介
- js中的文档模式-document.compatMode
- 前端面霸系列(1):doctype 、Quirks Mode & Standards Mode 、document.compatMode
- 利用document.compatMode写出更兼容的JS
- document.compatMode属性
- document.compatMode属性
- document.compatMode介绍
- javascript document.compatMode属性
- js中的文档模式-document.compatMode
- document.compatMode属性
- document.compatMode属性