我如何获得成功,失败等各种阿贾克斯消息?我想提醒成功和错误值给用户。这是我下面如何获取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/ –