function ScollPostion() {
var t, l, w, h;
if (document.documentElement && document.documentElement.scrollTop) {
t = document.documentElement.scrollTop;
l = document.documentElement.scrollLeft;
w = document.documentElement.scrollWidth;
h = document.documentElement.scrollHeight;
} else if (document.body) {
t = document.body.scrollTop;
l = document.body.scrollLeft;
w = document.body.scrollWidth;
h = document.body.scrollHeight;
}
return {
top: t,
left: l,
width: w,
height: h
};
}
相关文章:
- 获取,设置滚动条位置! 2021-11-17
- 带滚动条html,js获取鼠标位置 2022-12-23
- 获取滚动条位置的API 2021-08-21
- vue之获取滚动条位置 2021-11-17
- 滚动条位置的获取和设置 2021-04-30
- extjs4获取和设置滚动条位置 2021-11-13
- uni-app 获取滚动条滚动位置 - 求脱单 2021-11-17
- js设置滚动条位置 2021-11-17