1、屏幕的宽高
window.screen.height;
window.screen.width;
2、屏幕工作区宽高
window.screen.availHeight;
window.screen.availHeight;
3.body对象的宽高(不含边线)
document.body.clientWidth;
document.body.clientHeight
4. 可见区域的宽高(不含边线)
document.documentElement.clientWidth;
document.documentElement.clientHeight
5、body对象及html高度和宽度(含边线)
document.body.offsetWidth;
document.body.offsetHeight;
document.documentElement.offsetWidth;
document.documentElement.offsetHeight;
6、网页全文的高度和宽度
document.body.scrollWidth;
document.body.scrollHeight;
7、网页滚动条被卷的高和左
document.body.scrollTop;
document.body.scrollLeft;
8、窗口相对于屏幕的位置关系
window.scrollTop;
window.scrollLeft;
9、距离上一个定位元素的顶端距离或左侧距离
offsetTop;
offsetLeft;