这里做异步加载只是一个简单的用JS来处理异步加载和展示出来的数据,做一个简单的记录:

<script type="text/javascript">
(function(){
var chanpinListUrl = __ROOT__+"?a=Index&c=Index&m=ajaxchanpinlist";
var info = oStr = oSum = "";
$(window).scroll(function(){
    if($(document).scrollTop()+$(window).height()>=$(document).height()){
        oSum = $('div.chanpinListBox>a').size();
        $.post(chanpinListUrl,{sum:oSum},function(result){
            eval("info="+result);
            oStr = "";
               for(var key in info){
            oStr += "<a href='"+"./"+"?a=Index&amp;c=Index&amp;m=content&amp;mid=25&amp;c>;
               };
               $('div.chanpinListBox').append(oStr);
        });
    };
});
})();
</script>

 

相关文章:

  • 2022-02-07
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-01
  • 2022-01-07
  • 2022-12-23
  • 2021-11-17
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案