【发布时间】:2014-03-06 02:12:55
【问题描述】:
jQueryjQuery.post( ) 上的文档
// Assign handlers immediately after making the request,
// and remember the jqxhr object for this request
var jqxhr = $.post( "example.php", function() {
alert( "success" );
})
.done(function() {
alert( "second success" );
})
.fail(function() {
alert( "error" );
})
.always(function() {
alert( "finished" );
});
// Perform other work here ...
// Set another completion function for the request above
jqxhr.always(function() {
alert( "second finished" );
});
success:参数和jqXHR.done( )方法有什么区别;如果没有,jqXHR.done( ) 方法的全部意义是什么?
【问题讨论】: