📜  javascript 访问 ajax 响应标头 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:10.657000             🧑  作者: Mango

代码示例1
// Remember to add JQuery to your html head!

var xhr = $.ajax({
    url: 'someurl',
    complete: function(data) {
        // Access your response headers by using return value
          xhr.getResponseHeader("date"); // Specify here the type of header
    }
});