ajax开始未请求数据之前与之后的函数


_articleIndex : function(page){
$.ajax({
url: window.location.href,
type: 'POST',
async : false,
dataType: 'json',
data: {page : page},
beforeSend:function(XMLHttpRequest){
$('.downld').show();  //之前
},
success : function(data){
var list = data;
console.log(list);
if(data.status == 1){
$('.articleindex').append(template('articleindex', data));
$('#page').val(page);
if(data['data'].length < 10){
$('.downld').hide();scrollstatus = 0;
$('.articleindex li:last a').css('border-bottom', 'none');
}
}
},
complete:function(XMLHttpRequest,textStatus){
$('.downld').hide(); //之后
},
});

},


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM