Ajax 简明教程

AJAX Tutorial | Learn Ajax

AJAX 是一种用于创建交互式 Web 应用程序的 Web 开发技术。如果您了解 JavaScript、HTML、CSS 和 XML,那么只需要花一个小时即可开始使用 AJAX。

AJAX is a web development technique for creating interactive web applications. If you know JavaScript, HTML, CSS, and XML, then you need to spend just one hour to start with AJAX.

Why to Learn Ajax?

AJAX 表示 非*同步 *Java 脚本和 *X*ML。AJAX 是一种利用 XML、HTML、CSS 和 Java Script 创建更好、更快和更具交互性的 Web 应用的新技术。

AJAX stands for *A*synchronous *Ja*vaScript and *X*ML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS, and Java Script.

  1. Ajax uses XHTML for content, CSS for presentation, along with Document Object Model and JavaScript for dynamic content display.

  2. Conventional web applications transmit information to and from the sever using synchronous requests. It means you fill out a form, hit submit, and get directed to a new page with new information from the server.

  3. With AJAX, when you hit submit, JavaScript will make a request to the server, interpret the results, and update the current screen. In the purest sense, the user would never know that anything was even transmitted to the server.

  4. XML is commonly used as the format for receiving server data, although any format, including plain text, can be used.

  5. AJAX is a web browser technology independent of web server software.

  6. A user can continue to use the application while the client program requests information from the server in the background.

  7. Intuitive and natural user interaction. Clicking is not required, mouse movement is a sufficient event trigger.

  8. Data-driven as opposed to page-driven.

Rich Internet Application Technology

迄今为止,AJAX是最有前景的富互联网应用程序 (RIA) 技术。它正在获得巨大的行业势头,并且出现了多套工具包和框架。但是同时,AJAX 存在浏览器不兼容问题,并且由 JavaScript 提供支持,这很难维护和调试。

AJAX is the most viable Rich Internet Application (RIA) technology so far. It is getting tremendous industry momentum and several tool kit and frameworks are emerging. But at the same time, AJAX has browser incompatibility and it is supported by JavaScript, which is hard to maintain and debug.

AJAX is Based on Open Standards

AJAX 基于以下开放标准−

AJAX is based on the following open standards −

  1. Browser-based presentation using HTML and Cascading Style Sheets (CSS).

  2. Data is stored in XML format and fetched from the server.

  3. Behind-the-scenes data fetches using XMLHttpRequest objects in the browser.

  4. JavaScript to make everything happen.

Audience

本教程对想要学习如何创建交互式网页以及使用 AJAX 提高网页速度和可用性的 Web 开发者很有用。

This tutorial will be useful for web developers who want to learn how to create interactive webpages as well as improve their speed and usability using AJAX.

Prerequisites

在尝试本教程之前,强烈建议您熟悉 HTML 和 JavaScript。

It is highly recommended that you are familiar with HTML and JavaScript before attempting this tutorial.

Frequently Asked Questions about AJAX

关于 AJAX 有一些常见问题 (FAQ),本部分将尝试简要解答这些问题。

There are some very Frequently Asked Questions(FAQ) about AJAX, this section tries to answer them briefly.