AJAX Basic

AJAX基础

AJAX HOME
AJAX首页
AJAX Intro
AJAX简介
AJAX Request
AJAX请求
AJAX Example
AJAX实例
AJAX Browsers
AJAX浏览器
AJAX XMLHttpRequest
AJAX XMLHttpRequest对象
AJAX Server
AJAX服务器端
AJAX Server Script
AJAX服务器脚本

AJAX Advanced

AJAX高阶

AJAX Suggest
AJAX建议
AJAX Source
AJAX源码
AJAX Database
AJAX数据库
AJAX XML File
AJAX XML文件
AJAX ResponseXML
AJAX响应XML

AJAX Examples

AJAX范例

AJAX Examples
AJAX范例

AJAX XMLHttpRequest

异步Javascript和XML 技术的 XMLHttp请求(扩展标记语言超文本传输请求)

Previous Next

AJAX uses the XMLHttpRequest object

AJAX使用XMLHttpRequest对象

To get or send information from/to a database or a file on the server with traditional JavaScript, you will have to make an HTML form, and a user will have to click the "Submit" button to send/get the information, wait for the server to respond, then a new page will load with the results.

用传统的JavaScript获取或发送信息从/到数据库或文件服务器上 ,您将不得不作一个HTML表单,用户必须点击“提交”按钮,以发送/获取信息,然后等待服务器的响应,届时结果将通过新的页面装载获得。

Because the server returns a new page each time the user submits input, traditional web applications can run slowly and tend to be less user-friendly.

由于每次服务器都通过用户点击提交以返回新页面,所以传统的web应用运行就很慢和很低的用户友善度。

With AJAX, your JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object.

通过AJAX技术的XMLHttpRequest对象,你的JavaScript将与服务器直接沟通。

With the XMLHttpRequest object, a web page can make a request to, and get a response from a web server - without reloading the page.

由于XMLHttpRequest对象,页面发送请求和从服务器获得响应,都无需重新装载页面了。

The user will stay on the same page, and he or she will not notice that scripts request pages, or send data to a server in the background.

用户将停留在同一页面,用户也无需注意到脚本请求页面和在后台发送数据至服务器。


The XMLHttpRequest object

XMLHttpRequest对象

By using the XMLHttpRequest object, a web developer can update a page with data from the server after the page has loaded!

通过使用XMLHttpRequest对象,网页开发者在页面装载完还可以更新页面数据。

AJAX was made popular in 2005 by Google (with Google Suggest).

AJAX技术由于Google的推动在2005年流行起来(如Google搜索框建议技术)。

Google Suggest is using the XMLHttpRequest object to create a very dynamic web interface: When you start typing in Google's search box, a JavaScript sends the letters off to a server and the server returns a list of suggestions.

Google搜索框建议技术是使用XMLHttpRequest对象去创建一个非常动感的web接口:当你在Google的搜索框中打字时,JavaScript把字符发送给服务器同时服务器返回相应建议列表。

The XMLHttpRequest object is supported in all major browsers (Internet Explorer, Firefox, Chrome, Opera, and Safari).

XMLHttpRequest对象支持所有主流浏览器(IE浏览器,火狐浏览器,Chrome浏览器,Opera浏览器,和Safari浏览器)


Previous Next

宏飞网络是你学习web开发、测试web程序实例、和培养职业技能的首选网站。我们提供例子也许有些简单,但对理解基本概念有帮助。

我们尽量避免在教程、参考及例子中出现错误,但不能保证所有的内容都是正确的。

你使用本网站时,我们默认你已经阅读并接受了我们的隐私政策。

Copyright 2003-2011宏飞网络 版权所有