js wap端到达页面底部实现刷新

1 window.onscroll=function(){
2     var a = document.documentElement.scrollTop==0? document.body.clientHeight : document.documentElement.clientHeight;
3     var b = document.documentElement.scrollTop==0? document.body.scrollTop : document.documentElement.scrollTop;
4     var c = document.documentElement.scrollTop==0? document.body.scrollHeight : document.documentElement.scrollHeight;
5 
6     if(a+b==c){
7         showmore();
8     }
9 }
posted @ 2014-07-22 16:23  WangShenCo代码  阅读(398)  评论(0编辑  收藏  举报