<body>

<div style="width:200px; height:1000px; border:1px solid red;" ></div>

<script>
 window.onscroll = function(){ 
    var t = document.documentElement.scrollTop || document.body.scrollTop; //滚动条滚动的长度 
    var height=document.body.scrollHeight - window.screen.availHeight;  //网页页面整体高度  -  浏览器可见区域高度
   
    if( t >= height ) {
        //在此ajax异步加载数据显示
alert(height); $("div").last().after("<div style='width:200px; height:50px;'>"+Date.now()+"</div>"); } } </script> </body>

  

相关文章:

  • 2021-12-11
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2021-10-11
相关资源
相似解决方案