如何在下面获取状态代码(200、400、404 等)showResponse
:
$("#myform").validate({
submitHandler: function(form) {
var options = {
success: showResponse
};
$(form).ajaxSubmit(options);
function showResponse(responseText, statusText, xhr, $form) {
if (responseText == 'ok') { // status code to be used instead
...
} else {
...
}
}
return false;
}
});