jQuery
文檔上jQuery.post()
jQuery.post().done()和成功:
// 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()
方法的整個點是什麼?