<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script> <style> * { margin: 0; padding: 0 } body { height: 2000px; background: #ff2d51 url("images/webp.webp") no-repeat; } </style></head><body> <!-- 判断滚动条是否到达底部 --> <script> $(window).scroll(function () { console.log(isReachBottom()) if(isReachBottom()){ /*发送http请求 */ } }) function isReachBottom() { var scrollTop = $(window).scrollTop(); //获取滚动条距离顶部的高 var availHeight = $(window).height(); //获取可视区域的高 var dw = $(document).height(); //获取内容区域的高 return (scrollTop + availHeight) > dw -200 ? true : false; } </script></body>