我如何獲得成功,失敗等各種阿賈克斯消息?我想提醒成功和錯誤值給用戶。這是我下面如何獲取responseText消息?
代碼,我覺得200是成功的..我如何訪問成功和失敗值,這樣我就可以基於該
$(function() {
$("#save").click(function() {
$.ajax({
type: "POST",
url: "some.json",
data: json_data,
contentType: 'application/json',
success: function() {
//if success forward to landing page else return to form for correctiion
}
});
});
});
這消息你在說什麼? – Magus
爲什麼不閱讀[文檔](http://api.jquery.com/jQuery.ajax/)? '成功(data,textStatus,jqXHR)' – undefined
也看看這裏:http://api.jquery.com/jQuery.ajax/ –