20
今天我聽說jQuery.ajax函數中的success-Parameter參數已被棄用。我理解正確嗎?還是我誤解了一些東西?棄用成功jQuery.ajax中的參數?
例如,這將不會在今後的工作:
$.ajax({
url: 'ax_comment.php',
type: 'POST',
data: 'mode=view¬e_id='+noteid+'&open='+open+'&hash='+hash,
success: function(a) {
...
}
});
,我必須用這個?
$.ajax({
url: 'ax_comment.php',
type: 'POST',
data: 'mode=view¬e_id='+noteid+'&open='+open+'&hash='+hash,
success: function(a) {
...
}
}).done(function(a){.....};
來源:http://api.jquery.com/jQuery.ajax/(向下滾動到棄用通知)
是..你需要使用'.done()'jQuery的仍然有這個功能,直到每當他們決定拔插頭:) – karthikr 2013-04-04 20:33:46
該參數不被棄用,成功的方法是。您可以繼續使用'success:function'重新仔細閱讀。 – 2013-04-04 20:34:17