如果 post 调用成功,我如何访问从服务器返回的原始 HTTP 状态文本。对于错误,.error
方法中有选项 errorThrown。中是否有模拟参数.success
?
代码:
$.post(UI.SelectionList.settings.leftReturnURL, {
delegateId: $(this).data('id')
}, function (data, text, xhr) {}).success(function() {
console.log(arguments);
});
控制台输出:
["", "success", Object] //Object is the jqXHR object, statusText inside is also "success"