Javascript Xhr上载进度事件在ubuntu下的firefox中不起作用

Javascript Xhr上载进度事件在ubuntu下的firefox中不起作用,javascript,firefox,ubuntu,xmlhttprequest,progress,Javascript,Firefox,Ubuntu,Xmlhttprequest,Progress,以下代码在windows和linux(Ubuntu)下的chrome中运行良好,但firefox在windows而不是linux(Ubuntu)下运行: 上传完成后,进度触发一次 $.ajax({ type: POST, url: "upload.php", data: [formdata object], dataType: "json", xhr: function() { var progressXhr = $.ajaxSettings.xhr

以下代码在windows和linux(Ubuntu)下的chrome中运行良好,但firefox在windows而不是linux(Ubuntu)下运行:

上传完成后,进度触发一次

$.ajax({
   type: POST,
   url: "upload.php",
   data: [formdata object],
   dataType: "json",
   xhr: function() {
        var progressXhr = $.ajaxSettings.xhr();
        if(progressXhr.upload){
            progressXhr.upload.addEventListener('progress',progressHandlingFunction, false);
        }
        return progressXhr;
   },
   beforeSend: function(jqXHR){
    $("#upload_div").show();
   },
   complete: function(jqXHR, textStatus){
    $("#upload_div").hide();
   }
});

function progressHandlingFunction(e){
    percent = (e.loaded * 100) / e.total;
    $("#upload_div").html("%" + percent);
}

这是ubuntu中的一个firefox错误。我还没找到解决办法!!!这是ubuntu中的一个firefox错误。我还没找到解决办法!!!