Skip to content

Commit 05f2bd2

Browse files
committed
获取页面高度
1 parent 44aec96 commit 05f2bd2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

getPageHeight.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* @description 获取页面高度
3+
* @author 未知
4+
*/
5+
6+
function getPageHeight(){
7+
var g = document, a = g.body, f = g.documentElement, d = g.compatMode == "BackCompat"
8+
? a
9+
: g.documentElement;
10+
return Math.max(f.scrollHeight, a.scrollHeight, d.clientHeight);
11+
}

0 commit comments

Comments
 (0)