标签:style blog io ar java 数据 div c on
<body>
<div style="width:200px; height:1000px; border:1px solid red;" id="top_div"></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>
标签:style blog io ar java 数据 div c on
原文地址:http://www.cnblogs.com/hanyouchun/p/4010841.html