什么是Ajax

简介: 异步Javascript和XML(Ajax)是一个描述在客户端脚本和服务器之间传输数据过程的名词。

异步Javascript和XML(Ajax)是一个描述在客户端脚本和服务器之间传输数据过程的名词。它的优点是给开发者提供了一种从Web服务器接受内容而不用重新刷新用户当前正在浏览的页面的方式。

Asynchronous JavaScript and XML (Ajax) is a term for the process of

transferring data between a client script and the server. The advantage of

this is that it provides developers with a way to retrieve content from a

Web server without reposting the page the user is currently viewing to the

server. In concert with modern browsers’ ability to dynamically change

displayed content through programming code (JavaScript) that accesses

the browser's DOM, Ajax lets developers update the HTML content

displayed in the browser without refreshing the page. Thus, Ajax 

provides dynamic interaction between a client and a server.  In other

words, Ajax can make browser-based applications more interactive, more

responsive, and more like traditional desktop applications. Google's Gmail

and Outlook Express are two familiar examples that use Ajax techniques.

Ajax has various applications, some of which are discussed below.

1. Dynamic Form Data Validation. As an example, suppose a user fills

out a form to register with a web site.The validity of data in the form

is not checked till the form is submitted. With Ajax, the data added to

the form is dynamically validated using business logic in a server

application. Thus, a complete form does not have to be posted to the

server to check if data in the form is valid.  

2. Auto completion. As a user adds some data to a form, the remaining

form gets auto completed.

3. Refreshing data on a page. Some web pages require that data be

refreshed frequently, a weather web site  for example. Using the Ajax

technique, a web page may poll the server for latest data and refresh

the web page without reloading the page.

Ajax is based on     XMLHttpRequest, JavaScript and XML DOM

technologies. JavaScript and XML DOM technologies are relatively old

technologies. Therefore we won’t discuss these. XMLHttpRequest is a relatively new technology. In the next section, we shall discuss the XMLHttpRequest technology.

相关文章
|
XML 前端开发 JavaScript
01、什么是ajax?
<p><span style="font-size: 14pt;">什么是ajax?</span><br><span style="font-size: 14pt;">1、ajax(asynchronouse javascript and xml)异步的javascript和xml</span><br><span style="font-size: 14pt;">2、是7种技术的综合,它包含了
892 0
|
11月前
|
XML 前端开发 JavaScript
什么是Ajax和jquery
什么是Ajax和jquery
81 0
|
5月前
|
JSON 前端开发 Java
利用Spring Boot处理JSON数据实战(包括jQuery,html,ajax)附源码 超详细
利用Spring Boot处理JSON数据实战(包括jQuery,html,ajax)附源码 超详细
125 0
|
5月前
|
敏捷开发 JavaScript 前端开发
❤❤❤【Vue.js最新版】sd.js基于jQuery Ajax最新原生完整版for凯哥API版本❤❤❤
❤❤❤【Vue.js最新版】sd.js基于jQuery Ajax最新原生完整版for凯哥API版本❤❤❤
|
前端开发 JavaScript
jQuery中的Ajax请求----ajax请求篇(二)
在jQuery中的Ajax请求其实是在底层对原生js请求方式的封装,那么jQuery中的Ajax请求是怎样的呢?
61 0
|
5月前
|
前端开发 JavaScript
Jquery ajax捕获错误信息
Jquery ajax捕获错误信息
50 0
|
5月前
|
JSON 缓存 前端开发
Jquery中AJAX的应用
Jquery中AJAX的应用
73 0
|
5月前
|
JSON 前端开发 JavaScript
jQuery中ajax的使用
jQuery中ajax的使用
|
5月前
|
XML JavaScript 前端开发
【Web智能聊天客服】之JavaScript、jQuery、AJAX讲解及实例(超详细必看 附源码)
【Web智能聊天客服】之JavaScript、jQuery、AJAX讲解及实例(超详细必看 附源码)
85 0
|
5月前
|
前端开发 JavaScript API
【uni-app】【基于jQuery Ajax】[sd.js]最新原生完整版for凯哥API版本
【uni-app】【基于jQuery Ajax】[sd.js]最新原生完整版for凯哥API版本