jquery+ajax无刷新加载数据,新闻浏览更多

 

  

<script type="text/javascript">
$(document).ready(function (){
  $(window).scroll(function(){
  var page = 1;
  totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
   if($(document).height() <= totalheight){
       page++;
       $.ajax({
        url:'${base.contextPath}/news/getList?typeId=0&pageNo='+page,
        type:'get',
        dataType:'json',
        success:function(result){
          $("more").before(data);
        }
       });
  //     alert("到底部了");
   }
  });
});
</script>
上一篇:Spring Boot:集成Druid数据源


下一篇:结构化日志类库 ---- Serilog库