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

      1. 如果 XMLHttpRequest 对象支持 W3C 进度事件,如何检

        时间:2023-10-13
      2. <small id='dTg1b'></small><noframes id='dTg1b'>

        1. <tfoot id='dTg1b'></tfoot>

            <legend id='dTg1b'><style id='dTg1b'><dir id='dTg1b'><q id='dTg1b'></q></dir></style></legend>

            • <bdo id='dTg1b'></bdo><ul id='dTg1b'></ul>

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

                  本文介绍了如果 XMLHttpRequest 对象支持 W3C 进度事件,如何检查 JavaScript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  如果 XMLHttpRequest 对象支持 W3C 进展事件?我的意思是如果将 onloadonprogressonabortonerror 等属性设置为某些处理函数如上所述,那些函数调用了这些事件.

                  Is there any way to check within JavaScript if XMLHttpRequest object supports W3C Progress Events? I mean here if setting onload, onprogress, onabort, onerror, etc. properties to some handler function would have those function called those events, as described.

                  附加(额外)问题:有没有办法增加 XMLHttpRequest(例如使用一些计时器)来支持这些事件?

                  Additional (bonus) question: is there a way to augment XMLHttpRequest (e.g. using some timers) to support those events?

                  旁注:我首先在 XMLHttpRequest 这里

                  推荐答案

                  你试过这样吗?

                  try {
                      var xhr = new XMLHttpRequest();
                  
                      if ('onprogress' in xhr) {
                          // Browser supports W3C Progress Events
                      } else {
                          // Browser does not support W3C Progress Events
                      }
                  } catch (e) {
                      // Browser is IE6 or 7
                  }
                  

                  我在 Firefox &IE8.Firefox 显示它支持它.IE 表示它不支持 W3C Progress 事件.

                  I tested this in Firefox & IE8. Firefox shows it supports it. IE says it has no support for W3C Progress events.

                  这篇关于如果 XMLHttpRequest 对象支持 W3C 进度事件,如何检查 JavaScript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:通过 XHR 请求下载 PDF 文件 下一篇:自定义 XMLHttpRequest.prototype.open

                  相关文章

                  最新文章

                    <legend id='duKSx'><style id='duKSx'><dir id='duKSx'><q id='duKSx'></q></dir></style></legend>
                  1. <tfoot id='duKSx'></tfoot>

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

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