clientHeight元素的客户区域大小是指元素内容及其边框所占的空间大小。 实际检索的大部分是视口的大小。
scrollHeight滚动大小是指包含滚动内容的元素大小(元素内容的总高度)
offsetHeight偏移包含元素在屏幕上使用的所有可见空间。 这还包括内部边距的滚动条和边框大小(外部边距除外)
获取浏览器显示窗口宽度相对于Internet Explorer、Chrome、Firefox、Opera和Safari window.innerHeight高度的高度
window.innerWidth宽度
Internet Explorer 8、7、6和5 document.documentelement.clientheight的高度
document.documentelement.clientwidth宽度
或者
document.body.clientHeight高度
document.body.clientWidth宽度