<script type="text/javascript">
var startP=1;
$(document).ready(function(){
$("#scrolldiv").unbind("scroll").bind("scroll", function(e){
var sum = this.scrollHeight;
if (sum <= $(this).scrollTop() + $(this).height()) {//此处说明一定滑动到底部才触发
$.post("More.html",
{ "startP": startP},
function(data){
var json = eval(data); //数组
$.each(json, function (index, item) {
var id = json[index].id;
var title = json[index].title;
var time = json[index].createtime.time;
var myDate = new Date(time);
var result=myDate.getFullYear()+'-'+(myDate.getMonth()+1)+'-'+myDate.getDate() ;
var newobj = $("#scrolldiv").children().last().clone();
$(newobj).find(".spant").text(title);
$(newobj).find(".spand").text(result);
$(newobj).unbind("click").bind("click",function(){window.open('gsj.html?id='+id,'_self');});
$("#scrolldiv").append(newobj);
});
startP=Number(startP)+1;
}, "json");
}
});
});
</script>