Introduction to AJAX Usage

Source: Internet
Author: User

Mastering Ajax Technology

Mastering Ajax Development Steps

Mastering Ajax For instance development

The technology that Ajax applies To

Ajax involves 7 technologies, of which javascript,xmlhttprequest,dom,xml is the most important

XMLHttpRequest is an object of the XMLHTTP component, which allows Ajax to exchange data with the server just like a desktop application, without having to refresh the interface every time, or handing over the data to the server every time. This can reduce the burden on the server and speed up the response, reducing user wait time.

IE5.0 Start, developers can use the WAB page

The Xmlhttpactivex component extends its own functionality without navigating from the current Web page to directly transfer data to the server or to accept data from the service.

Moilla1.0 and NetScape7 are created to inherit the XML proxy class

XMLHttpRequest; For most cases, the XMLHttpRequest object is similar to the XMLHTTP component, similar in method and property, except that some properties are different

Xmlhttpresquest Object

Methods for Xmlhttpresquest objects

Method Describe
Abort () Stop the current request
getAllResponseHeaders () Returns a single Hearder label as a string
Open ("Method", "URL" [, Asynflag[,usernamme "[," Password "]]) Set the target URL method and other parameters for pending requests
Send (content) Post a request
Setrequesthearder ("label", value) Set the header and send it with the request

Xmlhttpresquest Object

Xmlhttpresquest properties of an object

Property Describe
onReadyStateChange Event triggers for state changes
ReadyState

Object State (integer):

0= initialization, 1= read, 2 = read, 3 = interactive, 4 = complete

Resquesttext The text of the data returned by the server data
Resquestxml The server process returns a compatible DOM XML Document object for the data
Status The server returns a status code, such as 404 = "File not found", 200 = "Success"
StatusText Status text information returned by the server

Javascript/dom/xml

JavaScript has been positioned as the scripting language of the customer service, and the most applied place is the verification of the form data. Now, you can use JavaScript to manipulate xmlhttpresquest to connect to the database

The DOM (document Object Model) is a set of APIs that are provided to HTML and XML, provide a structure for the presentation of the file, and can use it to change its contents. The scripting language can be used by the DOM to interact with the page. The properties, methods, and events that Web developers can manipulate and build files are presented as objects. For example, document represents the XML of the Page object itself, which is the data transmitted on the Internet, and the documents conform to the unified standard. XML makes it easy for all programs to share

Introduction to AJAX usage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.