最近开发用到这几个API 记录一下
/** 获取浏览器窗口的总高度*/ function getOffsetHeight(){ ???return document.documentElement.offsetHeight || document.body.offsetHeight;}/** 获取浏览器窗口的可视区域的高度*/ function getViewPortHeight() { ???return document.documentElement.clientHeight || document.body.clientHeight;}// 获取浏览器窗口垂直滚动条的位置function getScrollTop() { ???return document.documentElement.scrollTop || document.body.scrollTop;}
js关于可视区高度的一些运算
原文地址:https://www.cnblogs.com/koala0521/p/9135752.html