久久久久久久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人人夜夜澡人人爽 | 伊人伊人伊人 | 国产精品区二区三区日本 | 激情五月综合 | 国产亚洲欧美在线视频 | 韩日在线视频 | 国产免费一区二区三区 | 国产特级毛片 | 日日摸夜夜添夜夜添精品视频 | 亚洲欧美激情精品一区二区 | 欧美伊人| 久久久精品一区 | 久久国产福利 | 国产精品毛片无码 | 成人综合在线视频 | 日本久久久久久 | 99久久日韩精品免费热麻豆美女 | 精品久久久网站 | 狠狠躁躁夜夜躁波多野结依 | 久久大 | 日本精品视频 | 精品久久中文字幕 | 国产精品99精品久久免费 | 91精品国产91久久久 | 少妇特黄a一区二区三区88av | 黄色网址av | 国产在线精品一区二区三区 | www.亚洲视频.com | 免费观看一级特黄欧美大片 | 久久久久国产精品午夜一区 | 亚洲精品v日韩精品 | 色噜噜亚洲男人的天堂 | 国产精品中文字幕在线 | 999精品在线观看 | 欧美性video| 天天夜碰日日摸日日澡 | 综合九九| 日韩精品一区在线 | 男女又爽又黄视频 | 国产蜜臀 |