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

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

      <tfoot id='mZtki'></tfoot>

          <bdo id='mZtki'></bdo><ul id='mZtki'></ul>

      1. <small id='mZtki'></small><noframes id='mZtki'>

      2. 當任何 XMLHttpRequest 完成時如何運行函數?

        How to run a function when any XMLHttpRequest is complete?(當任何 XMLHttpRequest 完成時如何運行函數?)
        <tfoot id='X56T9'></tfoot>
          <bdo id='X56T9'></bdo><ul id='X56T9'></ul>

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

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

              <legend id='X56T9'><style id='X56T9'><dir id='X56T9'><q id='X56T9'></q></dir></style></legend>
                  本文介紹了當任何 XMLHttpRequest 完成時如何運行函數?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在處理一個項目,該項目有幾個我無法更改的腳本.這些腳本通過 AJAX 更新頁面.更新完成后,我需要運行一些代碼.

                  I'm working on a project that has several scripts that I cannot change. These scripts update the page via AJAX. When the update is complete I need to run some code.

                  當任何 XMLHttpRequest 完成時是否會觸發任何事件?(或任何 XMLHttpRequest 狀態更改?).

                  Is there any event that fires when any XMLHttpRequest is complete? (or any XMLHttpRequest state change?).

                  不幸的是,我無法訪問用于發出請求的特定 XMLHttpRequest 對象.

                  Unfortunately I cannot access the specific XMLHttpRequest object used to make the request.

                  謝謝,

                  推薦答案

                  不使用 jQuery,您可以掛鉤 open 方法來為每個 XHR 對象的 readystatechange 事件附加一個監聽器在 XHR 對象被 opened 時.確保在發生任何 Ajax 之前運行以下代碼:

                  Without jQuery, you can hook the open method to attach a listener for each XHR object's readystatechange events at the time the XHR object is opened. Ensure the following code runs before any Ajax occurs:

                  // save the real open
                  var oldOpen = XMLHttpRequest.prototype.open;
                  
                  function onStateChange(event) {
                      // fires on every readystatechange ever
                      // use `this` to determine which XHR object fired the change event
                  }
                  
                  XMLHttpRequest.prototype.open = function() {
                      // when an XHR object is opened, add a listener for its readystatechange events
                      this.addEventListener("readystatechange", onStateChange)
                  
                      // run the real `open`
                      oldOpen.apply(this, arguments);
                  }
                  

                  或者,如果您只關心成功的 load 事件,則可以偵聽該事件而不是 readystatechange.

                  Alternatively, if you only care about successful load events, you can listener for that event instead of readystatechange.

                  這篇關于當任何 XMLHttpRequest 完成時如何運行函數?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 部分內容)

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

                              <tbody id='a7lhE'></tbody>
                          1. <legend id='a7lhE'><style id='a7lhE'><dir id='a7lhE'><q id='a7lhE'></q></dir></style></legend>
                          2. <small id='a7lhE'></small><noframes id='a7lhE'>

                            <tfoot id='a7lhE'></tfoot>
                            主站蜘蛛池模板: 在线国产视频 | 亚洲乱码一区二区三区在线观看 | 久久免费精品 | 精品在线观看一区 | 国产乱码精品一区二区三区忘忧草 | a级在线免费 | 国产女人与拘做视频免费 | 亚洲精品一二三 | 亚洲免费在线视频 | 成人午夜免费福利视频 | 国产日韩精品在线 | 91在线一区 | 日日操操 | 欧美精品二区 | 国产专区在线 | 中文字幕第一页在线 | av一区在线| 在线观看av不卡 | pacopacomama在线| 亚洲国产精品第一区二区 | 网站黄色av | 亚洲欧美一区二区三区国产精品 | 欧美一区二区在线观看 | 国产一区二区精 | 国产一区二区三区久久久久久久久 | 日韩在线播放中文字幕 | 奇米四色在线观看 | 国产成人精品免费 | 亚洲精品国产精品国自产在线 | 美女爽到呻吟久久久久 | 偷拍亚洲色图 | 中文字幕在线不卡播放 | 在线综合视频 | 日韩欧美在线不卡 | 久久久久国产一区二区三区四区 | 久久精品国产一区二区电影 | 成人网在线观看 | 国产精品1区 | 色综合色综合 | 久久国产精品网站 | 在线观看www高清视频 |