我想用新功能(http://api.jquery.com/jQuery.ajax)对http状态代码(如200,201或202)作出反应.但该功能忽略了我的201和202回调.
firefox-4.0_b10和chromium-9.0会出现此错误
我期待着解决这个小问题.
关心斯特凡
我的代码剪了:
jQuery.ajax({
url: url,
dataType: 'json',
statusCode: {
404:function() { alert("404"); },
200:function() { alert("200"); },
201:function() { alert("201"); },
202:function() { alert("202"); }
},
success: function(data){
switch(data.status) {
case 'done':
/* display it to the User */
break;
}
});