function get_more(){? ? $('.more span').text('加載中...');? ? $.ajax({? ? ? ? type: "POST",? ? ? ? url: "{:U('Wall/MoreExpress')}",? ? ? ? data: {? ? ? ? ? ? last:$('#last_id').val(),? ? ? ? ? ? p:page,? ? ? ? ? ? keyword:"{$keyword}"? ? ? ? },? ? ? ? dataType: "json",? ? ? ? success: function(data){? ? ? ? ? ? var count = getPropertyCount(data);? ? ? ? ? ? if(count > 0){? ? ? ? ? ? ? ? start_y = 0;? ? ? ? ? ? ? ? end_y = 0;? ? ? ? ? ? ? ? page++;? ? ? ? ? ? ? ? var html = $('#clone').html();? ? ? ? ? ? ? ? var rep = '';? ? ? ? ? ? ? ? $.each(data, function(i,e){? ? ? ? ? ? ? ? ? ? $('#last_id').val(e.id);? ? ? ? ? ? ? ? ? ? rep += html.replace('{1}',e.href);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{2}',e.object);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{3}',e.ymd);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{4}',e.hi);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{5}',e.comment);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{6}',e.express);? ? ? ? ? ? ? ? ? ? rep = rep.replace('{7}',e.source);? ? ? ? ? ? ? ? });? ? ? ? ? ? ? ? $('.main_section').append(rep);? ? ? ? ? ? ? ? $('.more span').text('加載更多');? ? ? ? ? ? }else{? ? ? ? ? ? ? ? $('.more span').text('全部加載完畢');? ? ? ? ? ? }? ? ? ? }? ? });}
有關ajax的問題,請問下面這段代碼是什么意思,希望哪位大神能幫我解答下,謝謝
qq_穆_2
2016-04-06 17:54:41