javascript中各种区域参数的解释
本篇是拾人牙慧,罗列js里常见几种区域参数的解释。
document.documentElement.clientWidth和document.documentElement.clientHeight
排除状态栏、标题栏、滚动条等等的可视区域,如图:

document.documentElement.scrollWidth和document.documentElement.scrollHeight
假如将整个内容展开的区域,如图:

document.body.scrollTop 和 document.body.scrollLeft
窗口左上角被卷起了多少,如图:

window.screen.width 和 window.screen.height
屏幕大小,这个跟硬件有关,机器确定、分辨率确定,屏幕大小就确定了:

window.screenTop 和 window.screenLeft
当前窗口相对于屏幕的位置,如图:

window.screen.availHeight 和 window.screen.availWidth
屏幕中可使用的工作区域,所以不包括任务栏,如图:
