js实现滚动到页面底端加载下一页数据

$(document).ready(function(){
                $(window).bind('scroll',function(){
                    show()
                });
                function show(){
                    if($(window).scrollTop()+$(window).height()>=$(document).height()){
                        read();
                    }
                }
                function read(){
                    alert('111');
                }

 });


var n = 0;

$(window).scroll(function () {
            if ($(window).scrollTop() == $(document).height() - $(window).height()) {
                n++;
                console.log(n)
            }
        });



猜你喜欢

转载自blog.csdn.net/m0_37971044/article/details/79650277
今日推荐