专题文章
时长:00:00更新时间:2020-11-27 19:36:09
实例如下所示。//获取滚动条距离顶部位置function getScrollTop() { var scrollTop = 0;if (document.documentElement && document.documentElement.scrollTop) { scrollTop = document.documentElement.scrollTop;} else if (document.body) { scrollTop = document.body.scrollTop;} return scrollTop;}//获取当前可视范围的高度function getClientHeight() { var clientHeight = 0。
查看详情