js获取页面高度


document.documentElement.offsetheight  ==>html高度

document.documentElement.clientHeight  ==> 窗口可见区域高度  


document.body.clientHeight  ==> body对象高度  

 document.body.offsetHeight ==> body对象高度(包括边线的高)  

 document.body.scrollHeight  ==>body全文高

 document.body.scrollTop  ==>被卷起的高度,(滚动条高度)


 div.offsetTop:获取对象相对于版面或由父坐标 offsetParent 属性指定的父坐标的高度   


原文地址:https://www.cnblogs.com/byronvis/p/5469094.html