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 属性指定的父坐标的高度   


 

posted @ 2016-05-07 20:29  Byronvis  阅读(1802)  评论(0编辑  收藏  举报