久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<tfoot id='3vyrQ'></tfoot>
    <bdo id='3vyrQ'></bdo><ul id='3vyrQ'></ul>
    1. <legend id='3vyrQ'><style id='3vyrQ'><dir id='3vyrQ'><q id='3vyrQ'></q></dir></style></legend>

      1. <i id='3vyrQ'><tr id='3vyrQ'><dt id='3vyrQ'><q id='3vyrQ'><span id='3vyrQ'><b id='3vyrQ'><form id='3vyrQ'><ins id='3vyrQ'></ins><ul id='3vyrQ'></ul><sub id='3vyrQ'></sub></form><legend id='3vyrQ'></legend><bdo id='3vyrQ'><pre id='3vyrQ'><center id='3vyrQ'></center></pre></bdo></b><th id='3vyrQ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3vyrQ'><tfoot id='3vyrQ'></tfoot><dl id='3vyrQ'><fieldset id='3vyrQ'></fieldset></dl></div>
      2. <small id='3vyrQ'></small><noframes id='3vyrQ'>

        XmlHttpRequest onprogress 間隔

        XmlHttpRequest onprogress interval(XmlHttpRequest onprogress 間隔)

        <legend id='DGn01'><style id='DGn01'><dir id='DGn01'><q id='DGn01'></q></dir></style></legend>
          • <tfoot id='DGn01'></tfoot>
                  <bdo id='DGn01'></bdo><ul id='DGn01'></ul>
                    <tbody id='DGn01'></tbody>
                • <small id='DGn01'></small><noframes id='DGn01'>

                • <i id='DGn01'><tr id='DGn01'><dt id='DGn01'><q id='DGn01'><span id='DGn01'><b id='DGn01'><form id='DGn01'><ins id='DGn01'></ins><ul id='DGn01'></ul><sub id='DGn01'></sub></form><legend id='DGn01'></legend><bdo id='DGn01'><pre id='DGn01'><center id='DGn01'></center></pre></bdo></b><th id='DGn01'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DGn01'><tfoot id='DGn01'></tfoot><dl id='DGn01'><fieldset id='DGn01'></fieldset></dl></div>
                  本文介紹了XmlHttpRequest onprogress 間隔的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 XmlHttpRequests 將圖像上傳到服務器,我想向用戶顯示這些上傳的進度.

                  I'm using XmlHttpRequests to upload images to a server and I'd like to show the user the progress of these uploads.

                  不幸的是,對我的 onprogress-event 處理程序的調用之間的間隔太大.對于 500k 的圖像,通常只調用一次或兩次 onprogress.

                  Unfortunately the interval between calls to my onprogress-event handler is too large. Usually onprogress is called only once or twice for a 500k image.

                  這是我的代碼:

                  /* This function is not called often enough */
                  function progress(e){
                      console.log('Uploading: ' + Math.round((e.loaded / e.total) * 100) + ' %');
                  }
                  
                  var xhr = new XMLHttpRequest();
                  xhr.upload.addEventListener('progress', progress, false);
                  xhr.send(data);
                  

                  是否可以更改此行為,或者是否可以在瀏覽器實現中的某處對其進行硬編碼?

                  Can this behaviour be changed or is this hardcoded somewhere in the browser implementation?

                  推薦答案

                  W3 在他們的 XMLHttpRequest 級別 2 文檔.顯然,跨瀏覽器的不同級別的一致性是可以預料的.

                  The W3 sets forth the following guidelines in their XMLHttpRequest Level 2 document. Obviously varying levels of conformance across browsers are to be expected.

                  上傳:

                  當請求實體正文被上傳并且上傳完成標志為假時,排隊一個任務以在 XMLHttpRequestUpload 對象上觸發一個名為 progress 的進度事件,大約每 50 毫秒或傳輸的每個字節,以最不頻繁的為準.- W3 XMLHttpRequest Level 2(粗體表示強調)

                  While the request entity body is being uploaded and the upload complete flag is false, queue a task to fire a progress event named progress at the XMLHttpRequestUpload object about every 50ms or for every byte transmitted, whichever is least frequent. - W3 XMLHttpRequest Level 2 (Bolded for emphasis)

                  下載:

                  如果說要發出進度通知,則在下載過程中,排隊一個任務以觸發一個名為 progress 的進度事件,大約每 50 毫秒或接收到的每個字節,以最不頻繁的為準.- W3 XMLHttpRequest Level 2(粗體表示強調)

                  When it is said to make progress notifications, while the download is progressing, queue a task to fire a progress event named progress about every 50ms or for every byte received, whichever is least frequent. - W3 XMLHttpRequest Level 2 (Bolded for emphasis)

                  我不知道自定義此功能的 api.

                  I am not aware of an api to customize this functionality.

                  這篇關于XmlHttpRequest onprogress 間隔的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                    <tbody id='F4ewJ'></tbody>

                  <small id='F4ewJ'></small><noframes id='F4ewJ'>

                    <legend id='F4ewJ'><style id='F4ewJ'><dir id='F4ewJ'><q id='F4ewJ'></q></dir></style></legend>
                    • <bdo id='F4ewJ'></bdo><ul id='F4ewJ'></ul>

                      <i id='F4ewJ'><tr id='F4ewJ'><dt id='F4ewJ'><q id='F4ewJ'><span id='F4ewJ'><b id='F4ewJ'><form id='F4ewJ'><ins id='F4ewJ'></ins><ul id='F4ewJ'></ul><sub id='F4ewJ'></sub></form><legend id='F4ewJ'></legend><bdo id='F4ewJ'><pre id='F4ewJ'><center id='F4ewJ'></center></pre></bdo></b><th id='F4ewJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='F4ewJ'><tfoot id='F4ewJ'></tfoot><dl id='F4ewJ'><fieldset id='F4ewJ'></fieldset></dl></div>
                      <tfoot id='F4ewJ'></tfoot>

                            主站蜘蛛池模板: av小说在线 | 天天成人综合网 | 国产区精品 | 欧美九九九 | 成人精品视频在线观看 | 91精品国产日韩91久久久久久 | 精品国产黄a∨片高清在线 成人区精品一区二区婷婷 日本一区二区视频 | 精品av| 久久精品国产清自在天天线 | 91就要激情 | av色站 | 黄色男女网站 | 91免费观看国产 | 国产精品福利在线 | 午夜国产精品视频 | 男女免费网站 | 日日碰狠狠躁久久躁婷婷 | 亚洲激情一区二区 | 在线成人免费视频 | 亚洲欧美网 | 久草免费在线视频 | 亚洲精品18| 成人在线观看免费 | 成人高潮片免费视频欧美 | 日本精品网站 | 夜夜操av | 91丨九色丨国产在线 | 男人视频网站 | 日韩一区二区在线观看视频 | 欧美福利三区 | 国产精品日韩在线观看一区二区 | 国产精品精品视频一区二区三区 | 色综合天天网 | 国产精品久久av | 国产精品a一区二区三区网址 | 久久婷婷国产香蕉 | 亚洲一区在线播放 | 亚洲国产精品va在线看黑人 | av男人的天堂av | 成人3d动漫一区二区三区91 | 国产成人叼嘿视频在线观看 |