Understanding: differences between common interaction methods and Ajax interaction Methods

Source: Internet
Author: User

Methods In Ajax engine objects:

  • Abort () stops the current request
  • GetAllResponseHeaders () returns the complete headers as a string.
  • GetResponseHeader ("headerlabel") returns a single header label as a string
  • Open ("method", "url" [, asyncflag [, "username" [, "password"])Create a call to the server. The method parameter can be get, post, or put, and the URL parameter can be relative URL or absolute URL.
  • Send (content)Send a request to the server
  • SetRequestHeader ("Header", "value") sets the specified header to the provided value,You must call open () before setting any header ()

Attributes in the aaja engine object

  • Onreadystatechange event trigger
  • Readystate object status (integer)
  • 0 = not initialized 1 = reading 2 = read 3 = interaction 4 = completed
  • The text version of the data returned by the responsetext server process
  • ResponsexmlXML document objects compatible with Dom returned by Server Processes
  • Status Code returned by the Status server, such as: 404 = "file not found", 200 = "successful"
  • StatustextStatus text returned by the server

Use ajax to request servers

Method to use the Ajax Engine


Common Browser Interaction

Ajax interaction in browsers

Related Article

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.