xhr을 대체 할 jquery.ajax 객체가 있습니다. 그러나 다음과 같은 코드를 실행하는 것은 나에게 오류를 제공합니다jQuery.ajax : TypeError : 객체 'xhr'의 객체 # <Object>이 함수가 아닙니다.
TypeError: Property 'xhr' of object #<Object> is not a function
관련 코드는 다음과 같습니다
var req = jQuery.ajaxSettings.xhr();
req.upload.addEventListener('progress', calendar.check_progress, false);
$.ajax({
url: script_root + '_save_file/'+id+'/'+timestamp,
type: 'POST',
processData: false,
contentType: false,
data: fd,
xhr: req,
success: function(data){
do_something();
},
error: function(data){
console.log(data);
do_something_else();
}
});
아약스 방법은 이름 XHR 없음 기능이 없습니다 : REQ가 ..이 요청을 어지럽히 –