$("#myupload").ajaxSubmit({
dataType: 'json',
beforeSend: function() {
$('.tip').html("上传中...");
},
uploadProgress: function(event, position, total, percentComplete) {
var percentVal = percentComplete + '%';
$('.tip').html(percentVal);
},
success: function(data) {
console.log(data);
$('.tip').html(data.msg);
},
error:function(xhr){
alert('上传失败');
}
});
}
最佳答案
