Firefox上的Jquery ajax错误0

Firefox上的Jquery ajax错误0,jquery,ajax,firefox,Jquery,Ajax,Firefox,我在Firefox中遇到了一些奇怪的ajax错误,这是我使用google chrome时没有遇到的: 以下是捕获此错误的ajax代码: $(document).ajaxError(function (e, xhr, opt, thrownError) { swal({ title: xhr.status + " " + xhr.statusText, //text: "Error requesting :

我在Firefox中遇到了一些奇怪的ajax错误,这是我使用google chrome时没有遇到的:

以下是捕获此错误的ajax代码:

$(document).ajaxError(function (e, xhr, opt, thrownError) {
            swal({
                title: xhr.status + " " + xhr.statusText,
                //text: "Error requesting : " + opt.url +" "+ thrownError,
                text: xhr.responseText,
                type: "error",
                timer: 15000
            });
            submit.removeClass('m-loader m-loader--right m-loader--light').attr('disabled', false);
        });
如果需要,下面是响应的屏幕截图:


尝试将AJAX调用包装在
$(document.ready(function(){})中函数