小结:

1、解耦数据交互层、展示层

By decoupling the data interchange layer from the presentation layer, Ajax allows Web pages, and by extension Web applications, to change content dynamically without the need to reload the entire page.[3]

https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started

In order to make an HTTP request to the server using JavaScript, you need an instance of a class that provides this functionality. This is where XMLHttpRequest comes in. Such a class was originally introduced in Internet Explorer as an ActiveX object called XMLHTTP. Then, Mozilla, Safari and other browsers followed, implementing an XMLHttpRequest class that supports the methods and properties of Microsoft's original ActiveX object. Meanwhile Microsoft has implemented XMLHttpRequest as well.

为了用JavaScript向服务器发送一个HTTP请求, 需要一个具备这种功能的类实例. 这样的类首先由Internet Explorer以ActiveX对象引入, 被称为XMLHTTP. 后来Mozilla, Safari 和其他浏览器纷纷仿效, 提供了XMLHttpRequest类,它支持微软的ActiveX对象所提供的方法和属性.

<script type="text/javascript">
<!--
if(window.XMLHttpRequest){
httpRequest = new XMLHttpRequest();
} else if (window.ActiveObject)
{
httpRequest = new ActiveObject("Microsoft.XMLHTTP");
} //-->
</script>

ajax(AJAX开发) - 搜狗百科 https://baike.sogou.com/v25064.htm?fromTitle=Ajax

Ajax 即“AsynchronousJavascriptAndXML”(异步 JavaScript 和 XML),是指一种创建交互式网页应用的网页开发技术。

Ajax = 异步JavaScript和XML(标准通用标记语言的子集)。

Ajax 是一种用于创建快速动态网页的技术。

Ajax 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术。[1]

通过在后台与服务器进行少量数据交换,Ajax 可以使网页实现异步更新。这意味着可以在不重新加载整个网页的情况下,对网页的某部分进行更新。

传统的网页(不使用 Ajax)如果需要更新内容,必须重载整个网页页面

Ajax (programming) - Wikipedia https://en.wikipedia.org/wiki/Ajax_%28programming%29

Ajax (also AJAX /ˈeɪdʒæks/; short for "Asynchronous JavaScript And XML")[1][2] is a set of Web development techniques using many Web technologies on the client side to createasynchronous Web applications. With Ajax, Web applications can send and retrieve data from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows Web pages, and by extension Web applications, to change content dynamically without the need to reload the entire page.[3] In practice, modern implementations commonly utilize JSON instead of XML due to the advantages of JSON being native to JavaScript.[4]

Ajax is not a single technology, but rather a group of technologies. HTML and CSS can be used in combination to mark up and style information. The webpage can then be modified by JavaScript to dynamically display – and allow the user to interact with — the new information. The built-in XMLHttpRequest object within JavaScript is commonly used to execute Ajax on webpages allowing websites to load content onto the screen without refreshing the page. Ajax is not a new technology, or different language, just existing technologies used in new ways.

The term Ajax has come to represent a broad group of Web technologies that can be used to implement a Web application that communicates with a server in the background, without interfering with the current state of the page. In the article that coined the term Ajax,[1][3] Jesse James Garrett explained that the following technologies are incorporated:

Since then, however, there have been a number of developments in the technologies used in an Ajax application, and in the definition of the term Ajax itself. XML is no longer required for data interchange and, therefore, XSLT is no longer required for the manipulation of data. JavaScript Object Notation (JSON) is often used as an alternative format for data interchange,[15] although other formats such as preformatted HTML or plain text can also be used.[16] A variety of popular JavaScript libraries, including JQuery, include abstractions to assist in executing Ajax requests.

Asynchronous HTML and HTTP (AHAH) involves using XMLHTTPRequest to retrieve (X)HTML fragments, which are then inserted directly into the Web page.

How to make an HTTP request 异步 JavaScript 和 XML的更多相关文章

  1. 【JavaScript】AJAX总结(异步JavaScript和XML)

    AJAX介绍 通过 AJAX,你可以创建更好.更快以及更友好的 WEB 应用程序. AJAX 基于 JavaScript 和 JavaScript的XMLHttpRequest对象. AJAX 应用程 ...

  2. 什么是AJAX? AJAX:”Asynchronous JavaScript and XML”中文意思:异步JavaScript和XML。

    指一种创建交互式网页应用的网页开发技术. AJAX并非缩写词,而是由Jesse James Gaiiett创造的名词. 不是指一种单一的技术,而是有机地利用了一系列相关的技术: web标准( Stan ...

  3. 什么是 ajax?----异步 javascript 和 xml

    GET 用于请求服务器数据 POST 用于上传数据到服务器,或者修改服务器数据 ajax 异步通信,实现页面的局部刷新,按需获取数据,节约带宽,带来更好的用户体验 客户端与服务器在不必刷新浏览器的情况 ...

  4. jquery与服务器交换数据的利器--ajax(异步javascript and xml)

    load() 方法从服务器加载数据,并把返回的数据放入被选元素中. 一.下面的例子把 "demo_test.txt" 文件中 id="p1" 的元素的内容,加载 ...

  5. ajax-异步JavaScript和XML

    什么是ajax? ajax是异步的javascript和XML ( Asynchronous Javascript And XML ) 优点:节省用户操作时间,提高用户体验.减少数据请求次数. 什么是 ...

  6. JavaScript操作XML

    JavaScript操作XML (一) JavaScript操作XML是通过XML DOM来完成的.那么什么是XML DOM呢?XML DOM 是: 用于 XML 的标准对象模型 用于 XML 的标准 ...

  7. 用javascript操作xml

    用javascript操作xml 可以使用标准DOM操作. IE创建XML MSXML2.0DOMDocument function createXMLDOM(){ var version = [ ' ...

  8. 第一百二十五节,JavaScript,XML

    JavaScript,XML 学习要点: 1.IE中的XML 2.DOM2中的XML 3.跨浏览器处理XML 随着互联网的发展,Web应用程序的丰富,开发人员越来越希望能够使用客户端来操作XML技术. ...

  9. javascript与XML

    曾几何时,XML一度成为存储和通过因特网传输结构化数据的标准,之前,浏览器无法解析XML数据时,开发人员都要手动编写自己的XML解析器.而自从DOM出现后,所有浏览器都内置了对XML的原生支持(XML ...

随机推荐

  1. 在Windows系统上搭建aria2下载器

    Aria2是一个命令行下运行.多协议.多来源下载工具(HTTP/HTTPS.FTP.BitTorrent.Metalink),并且支持迅雷离线以及百度云等常用网盘的多线程下载(甚至可以超过专用客户端的 ...

  2. IIS中采用ISAPI-Rewrite防盗链

    本规则支持白名单排除式防盗链,搜索引擎友好(不屏蔽),被盗链后的错误提示转向,支持各种文件类型,经作者亲验真的能用,第一时间在itmop.com原创发表,请继续往下阅读. 近来小站遇到了盗链问题,至使 ...

  3. Android开发--ZZ:Android APK反编译详解(附图)

    最近看了很多app的界面和交互非常棒,想学习下他们的源码,简单加压apk文件得到的资源文件和源码都不可读 它们都是编译后的文件,在网上搜索了下,发现这篇blog提到的工具都非常好用~ 文章原地址:ht ...

  4. Spring和junit测试之配置文件路径

    本人在测试一个方法时需要加载XML配置文件,spring提供了相应的方法,就小小研究了下,在此记录下具体的过程,方便初学者和自己日后回顾. Spring容器最基本的接口就是BeanFactory. B ...

  5. CentOS7--TigerVNC

    --安装服务yum install tigervnc-server -y --配置文件,多个用户就拷贝多个cp /lib/systemd/system/vncserver@.service /etc/ ...

  6. RN(八)——react-native-image-viewer & react-native-swiper

    以项目(业务GO)为例: react-native-swiper 轮播(用在首页的图集轮播) https://github.com/leecade/react-native-swiper react- ...

  7. 《JavaScript 秘密花园》

    恰巧今天是传统民间重要的节日之一--七夕节: 被大家挂在嘴上最多的一句话便是:有对象了吗?这不-- 这样的话,那咱就先给new出一个对象吧: var boyfriend = new Object(); ...

  8. codeforces水题100道 第七题 Codeforces Round #270 A. Design Tutorial: Learn from Math (math)

    题目链接:http://www.codeforces.com/problemset/problem/472/A题意:给你一个数n,将n表示为两个合数(即非素数)的和.C++代码: #include & ...

  9. JS - 查找同辈中的对象

    今天在使用parent().find(".a:first")的时候,发现查找结果非正常按照顺序来的.有点递归的感觉,从底层往上. 因为需要的是同级的对象,所以去查了一下jquery ...

  10. django进阶-查询(适合GET4以上人群阅读)

    前言: 下篇博客写关于bootstrap... 一.如何在脚本测试django from django.db import models class Blog(models.Model): name ...