abort ()Stop the current request
getallresponseheaders ()Returns all the response header information that contains the HTTP request, where the response header includes content such as Content-length,date,uri.
getResponseHeader (String header)Returns the value of the header corresponding to the key name specified in the response header of the HTTP request
Open (String method,string url,boolean asynch,string username,string password)Establish a call to the server. Where method represents the HTTP invocation methods. Generally, the "GET", "post" URL represents the address of the calling server Asynch whether it is asynchronous, true indicates that the two parameters can not be specified asynchronously, username and password represent the user name and password, respectively. Provide the user name and password required by the HTTP authentication mechanism
Send (content)The request is made to the server, and if it is asynchronous, the method returns immediately. Content can be unspecified, and its contents can be DOM objects, input streams, or strings.
onreadystatechangeAn event trigger that requests a state change (this method is called when readystate changes). is usually a JavaScript function
readyStateReadyState a change, the callback function is called
Request Status
0= not initialized.
After the 1=open method is successfully called.
The 2= server has answered the client's request.
3= in the interaction. The HTTP header information has been received and the response data has not been received.
4= completed. Data reception complete.
ResponseTextThe text content returned by the server
ResponsexmlXML content of the compatible DOM returned by the server
StatusThe server returns a status code. 200 means "success", 404 means "not found" and 500 means "internal error"
StatusTextThe server returns text information for the status code.
Some common methods of AJAX