Javascript ajax:TypeError:Property';xhr';对象#<;对象>;这不是一个函数

Javascript ajax:TypeError:Property';xhr';对象#<;对象>;这不是一个函数,javascript,jquery,html,ajax,xmlhttprequest,Javascript,Jquery,Html,Ajax,Xmlhttprequest,我有一个jquery.ajax对象,我想在其中替换xhr。但是,执行以下代码时会出现错误: TypeError: Property 'xhr' of object #<Object> is not a function xhr以其他方式使用。见文件: xhr:函数 默认值:ActiveXObject可用时(即XMLHttpRequest) 否则 用于创建XMLHttpRequest对象的回调。默认为 ActiveXObject可用时(即),XMLHttpRequest不可用。 重写

我有一个jquery.ajax对象,我想在其中替换xhr。但是,执行以下代码时会出现错误:

TypeError: Property 'xhr' of object #<Object> is not a function

xhr
以其他方式使用。见文件:

xhr:函数

默认值:ActiveXObject可用时(即XMLHttpRequest) 否则

用于创建XMLHttpRequest对象的回调。默认为 ActiveXObject可用时(即),XMLHttpRequest不可用。 重写,为XMLHttpRequest或 对工厂的改进

也许你在找类似的东西

xhr: function() {
    var xhr = $.ajaxSettings.xhr();
    xhr.upload.addEventListener('progress', calendar.check_progress, false);
    return myXhr;
},

Ajax方法没有名为xhr:req的函数。。这会弄乱您的请求,是不是
var myXhr=$.ajaxSettings.xhr()?似乎是个打字错误。
xhr: function() {
    var xhr = $.ajaxSettings.xhr();
    xhr.upload.addEventListener('progress', calendar.check_progress, false);
    return myXhr;
},