functiongetPageHeight(){var g = document, a = g.body, f = g.documentElement, d = g.compatMode =="BackCompat"? a
: g.documentElement;return Math.max(f.scrollHeight, a.scrollHeight, d.clientHeight);}
获取页面scrollLeft
1functiongetPageScrollLeft(){2var a = document;3return a.documentElement.scrollLeft || a.body.scrollLeft;4}
获取页面可视宽度
functiongetPageViewWidth(){var d = document, a = d.compatMode =="BackCompat"? d.body
: d.documentElement;return a.clientWidth;}
获取页面宽度
functiongetPageWidth(){var g = document, a = g.body, f = g.documentElement, d = g.compatMode =="BackCompat"? a
: g.documentElement;return Math.max(f.scrollWidth, a.scrollWidth, d.clientWidth);}
获取页面scrollTop
1functiongetPageScrollTop(){2var a = document;3return a.documentElement.scrollTop || a.body.scrollTop;4}
获取页面可视高度
functiongetPageViewHeight(){var d = document, a = d.compatMode =="BackCompat"? d.body
: d.documentElement;return a.clientHeight;}