Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当用户滚动到页面底部时,我正在尝试将新内容从数据库加载到我的页面。这将如何实现?我已经将 jquery 的 ajax 和 php 结合起来,但我不知道。
我猜不需要任何插件。为此的 jQuery 代码
$(window).scroll(function () { if ($(window).scrollTop() >= $(document).height() - $(window).height() - 10) { //Add jQuery ajax code here to fetch data from server/database and append more elements etc } });