Dee*_*hav 12
var no=1;
$(window).scroll(function () {
if(no==1)
{
if ($(window).height() + $(window).scrollTop() == $(document).height()) {
no=2;
$.ajax({
type: "POST",
url: "request.php",
data: datas,
cache: false,
success: function(html){
}
});
}
}
});
Run Code Online (Sandbox Code Playgroud)
当用户到达页面末尾时,这会执行ajax调用.
您可以指定它出现的高度.
| 归档时间: |
|
| 查看次数: |
12792 次 |
| 最近记录: |