如果邮件调用成功,我如何访问从服务器返回的原始HTTP状态文本.对于错误,方法中有选项errorThrown .error.是否有模拟参数.success?
码:
$.post(UI.SelectionList.settings.leftReturnURL, {
delegateId: $(this).data('id')
}, function (data, text, xhr) {}).success(function() {
console.log(arguments);
});
Run Code Online (Sandbox Code Playgroud)
控制台输出:
["", "success", Object] //Object is the jqXHR object, statusText inside is also "success"
Run Code Online (Sandbox Code Playgroud)
$.ajax({
url: "/",
success: function(data, textStatus, jQXHR) {
console.log(jQXHR.status, jQXHR.statusText);
//200 "OK"
}
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
363 次 |
| 最近记录: |