The XMLHttpRequest object is unheard of because it is unfamiliar to Ajax. Before you start, learn about its properties and methods to pave the way for its use.
This article focuses on the properties and methods of XMLHttpRequest. Properties and events for XMLHttpRequest objects
Represents the state of a XMLHttpRequest object 
Contains HTTP-appropriate text content that is received by the client 
The DOM object corresponding to the XML content of the server response 
Server return HTTP status code 
The server returns a text message for the status code 
This event is triggered when the ReadyState property changes, and is used to trigger the callback function.
Initialization state. The XMLHttpRequest object has been created or has been reset by the Abort () method.
The open () method was invoked, but the Send () method was not invoked. The request has not been sent yet.
The Send () method has been invoked and the HTTP request has been sent to the WEB server. The response was not received.
All response headers have been received. The response body began to receive but did not complete.
The HTTP response has been fully received.
:When readystate=4, ResponseText contains the complete response information.
When readystate=3, ResponseText contains incomplete response information.
When Readystate<3, the ResponseText is an empty string.
: When readystate=4, and the Content-type MIME type of the response head is XML (Text/xml or Application/xml), the attribute has a value and is parsed into an XML document. Other cases are null, including the return of an XML document that is bad or does not complete the response.
: If 200 indicates success, and 404 indicates "NotFound" error. Reading this property when ReadyState is less than 3 results in an exception.
: When the state is 200 it is "OK" and when the state is 404 it is "not Found". As with the Status property, reading this property when ReadyState is less than 3 results in an exception.
Method 1.open method of XMLHttpRequest Object
Description: Develop HTTP method with server interaction, URL address and other request information.
Open (Method,url, async, username, password) for initialization
Return value: Gets an object that contains the Send () method
Method: Must be. Used to specify HTTP request methods that support all HTTP methods, such as Get,post, as specified
URI: The address of the requested server, which is automatically parsed into an absolute address.
Async: The request is asynchronous, true means that you are asynchronous, False indicates synchronization, default is True.
Username,password: You can specify the username and password, respectively, and provide the user name and password required by the HTTP authentication mechanism.
After calling open, the readystate state is 1.
Method 2.send (content)
Description: Makes a request to the server, and its contents can be DOM objects, input streams, or strings.
After you call the Open method, you can call the Send () method to send the request.
When async=true in Open, the Send () method returns immediately after the call, otherwise it is interrupted until the request returns.
Method 3.abort ()
The method can suspend a HttpRequest request or HttpResponse reception, and set the XMLHttpRequest state to initialize.
Method 4.set RequestHeader (Header,value)
This method is used to set the header information for the request.
This method needs to be invoked after the open method.
Method 5.getResponseHeader ()
Description: Returns all response header information containing HTTP, where the response header includes content such as Content-length,date,uri.
When Readystate>2, this method retrieves the header information for the response. Otherwise, an empty string is returned.
The getAllResponseHeaders () method returns all HttpResponse header information.
knowledge of the XMLHttpRequest object, the focus is on how to use the