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

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

      <legend id='Cu4q6'><style id='Cu4q6'><dir id='Cu4q6'><q id='Cu4q6'></q></dir></style></legend>
      • <bdo id='Cu4q6'></bdo><ul id='Cu4q6'></ul>
    1. <tfoot id='Cu4q6'></tfoot>

      为什么叫 XMLHttpRequest?

      时间:2023-10-14
      • <i id='x1xF7'><tr id='x1xF7'><dt id='x1xF7'><q id='x1xF7'><span id='x1xF7'><b id='x1xF7'><form id='x1xF7'><ins id='x1xF7'></ins><ul id='x1xF7'></ul><sub id='x1xF7'></sub></form><legend id='x1xF7'></legend><bdo id='x1xF7'><pre id='x1xF7'><center id='x1xF7'></center></pre></bdo></b><th id='x1xF7'></th></span></q></dt></tr></i><div id='x1xF7'><tfoot id='x1xF7'></tfoot><dl id='x1xF7'><fieldset id='x1xF7'></fieldset></dl></div>
          <bdo id='x1xF7'></bdo><ul id='x1xF7'></ul>

          <tfoot id='x1xF7'></tfoot>
            <tbody id='x1xF7'></tbody>

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

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

              1. 本文介绍了为什么叫 XMLHttpRequest?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我一直想知道为什么这个对象被这样称呼?

                I always wonder why this object is called like that?

                您的请求正文不需要是 XML 格式.此外,从服务器接收的数据可以以 JSON、XML、HTML 或纯文本的形式获取.XML 在这个对象中并不重要.这是某种陈词滥调吗?这个对象最初创建时是什么?

                The body of your request does not need to be in XML format. Also, data received from server can be fetched as JSON, XML, HTML, or plain text. XML does not play an essential part in this object. Is this some kind of a cliché? What is this object used to be when it was first created?

                推荐答案

                XMLHttpRequest 是由 Microsoft 的 Outlook Web Access 团队发明的.这个高度创新的团队之前给了我们远程脚本,这是AJAX"风格开发的开始.远程脚本类似于 JSONP,但过于复杂(它使用 Java 小程序,最重要的是).我不记得是否可以在 IE 4 或 5 中动态注入 <script> 元素,但这似乎是不可能的.否则,JSONP 似乎足够强大,可以消除对 XMLHttpRequest 的需求.

                XMLHttpRequest was invented by Microsoft's Outlook Web Access team. This highly innovative team previously gave us remote scripting, which was the the beginning of "AJAX" style development. Remote scripting was like JSONP, but overly complicated (it used a Java applet, of all things). I don't remember whether it was possible to dynamically inject <script> elements in IE 4 or 5, but it seems like that wasn't possible. Otherwise, JSONP seems powerful enough to eliminate the need for XMLHttpRequest.

                Outlook 团队正在将 XML 从服务器传输到客户端,因此命名 ActiveX 控件以反映其当时的主要用途.它被包含在 MSXML 解析器中.

                The Outlook team was transferring XML from server to client, so the ActiveX control was named to reflect its primary use at the time. It was included as part of the MSXML parser.

                当 Firefox 进入游戏并实现他们自己的版本时,XMLHttpRequest 的使用更像今天,而用于 XML 的则更少,但 Firefox 还是使用了相同的名称.由于两家最大的浏览器制造商创建了一个具有相同名称、界面和功能的对象,w3c 坚持使用现有名称.太糟糕了,有人没有对这个误称更恶毒,并坚持我们称它为更准确的东西,比如 HttpRequest.

                By the time Firefox got in on the game and implemented their own version, XMLHttpRequest was being used more like it is today, and less for XML, but Firefox used the same name anyway. With the two biggest browser makers creating an object with the same name, interface, and functionality, the w3c stuck with the existing name. It's too bad someone didn't make more of a stink about the misnomer and insist we call it something more accurate like just HttpRequest.

                我不知道AJAX"是如何或为什么成为一个流行的术语来描述网页与服务器交互而不需要完整的页面加载的编程风格.与XMLHttpRequest"相比,AJAX"用词不当,因为它不仅暗示 XML 是一个重要方面,而且还没有提供服务器交互的指示.我可以使用 JavaScript 异步处理 XML,而无需与服务器通信.

                I don't know how or why "AJAX" became the popular term to describe the programming style where a web page interacts with the server without requiring a complete page load. "AJAX" is a worse misnomer than "XMLHttpRequest" since it not only implies XML is an essential aspect, but further provides no indication of server interaction. I can process XML with JavaScript asynchronously without ever communicating with a server.

                这篇关于为什么叫 XMLHttpRequest?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:使用 XMLHttpRequest 上传大文件时的进度条 下一篇:使用 AJAX (XMLHttpRequest) 查询 Wikipedia 的 API

                相关文章

                最新文章

                <tfoot id='rUfH3'></tfoot>

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

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

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