document.documentElement.clientHeight 不能用 我获取我的数值是两千多 用的获取窗体高度的indow.screen.availHeight
2016-12-06
最赞回答 / 玉鸯子
osTop 只是一个变量.里面存有 当前滚动条距离页面顶部距离的值.而你写"osTop=200",只是操作变量osTop,将它的值重置成了200.与document.documentElement.scrollTop这个属性没有关系.
2016-11-30
可以试试mousewheel滚轮事件,当用户滚动鼠标滚轮时,我们就清除定时器、停止动画。
http://www.bkjia.com/jQuery/821747.html
但我逛了一些网站貌似都不会去考虑用户中断的情况诶。。。
http://www.bkjia.com/jQuery/821747.html
但我逛了一些网站貌似都不会去考虑用户中断的情况诶。。。
2016-11-24
document.documentElement.scrollTop||document.body.scrollTop
2016-11-22
最新回答 / illa
<script type="text/javascript">window.onload=function(){ var obtn=document.getElementById("btn"); //获取页面的可视区域的高度 var clientHeight=document.documentElement.clientHeight||document.body.clientHeight; var timer=null; var isTop=true; obtn.onclick=functio...
2016-11-14