试试(javascript):
var ID = $(".imageWrap:last").attr("id");var baseurl = "http://localhost/woho/";var doScroll = 1;var cct = $.cookie("<?php echo $this->config->item("csrf_cookie_name"); ?>");if (location.href == baseurl) { $(window).scroll(function(){ if ($(window).scrollTop() > $('body').height() / 2) { if(doScroll == 1) { $.post(baseurl + 'ajax/images',{'id':ID,'<?php echo $this->security->get_csrf_token_name(); ?>': cct}, function(data) { alert(data); $("#wrapper_content").append(data); ID++; }); } } });}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)