日期:2014-05-16 浏览次数:20781 次
var nowList; var nextList; var lastList; function loadNext(isNext) { var which; if(isNext) { which = String(page + 1); } else { which = String(page - 1); } alert(which); $.ajax({ url: "ajax/getArticle.ashx", type: "get", datatype: "xml", data:{pagesize:"10",page:which,sort:"desc"}, success: function(result) { if(isNext) { nextList = $(result).find("test"); } else { lastList = $(result).find("test"); } }, error:function(xq,ts,t) { loadNext(isNext); } }); } function next() { page++; lastList = nowList; loadNext(true); $("#articleList").text(""); showList(); }