IE6 must use the Microsoft.XMLHTTP ActiveX component to instantiate an object IE7 the XMLHttpRequest object has been implemented
var request = new ActiveXObject ("Microsoft.XMLHTTP"); IE6
var request= new XMLHttpRequest ();
Common methods for Request objects
Open (method, URL, isasynchronous); The third parameter, True/false, is asynchronous
setRequestHeader (label, value); Must be placed after open, send ();
Send (content); Content content is optional, such as the contents of a POST request
Abort (); Used to stop the current request
getAllResponseHeaders (); Returns a complete set of header information as a string
getResponseHeader (label); Returns a separate string value for the specified header
Request Object Event
onReadyStateChange
ReadyState
0: not yet initialized
1: Load in
2: Load Complete
3: Interaction
4: Complete
A string representation of the data returned in the ResponseText response
Responsexml document objects that are compatible with the DOM core must have the Content-type header information for the response set to Application/xml
Status indicates the number code of the request state 404 (OK) ...
StatusText a piece of information related to the status code
Common Request Method:
Get, a request to obtain header and other information from the server
POST, a request to modify information on the server
Head, which is used for the same request as get, but the head contains only the header information associated with the request and does not contain the requested body
PUT, for requests that want to store information in a particular location on the server
Delete, for requests that you want to delete files or resources on the server
OPTIONS, which lists the requests for files or resources on the server
2015-03-06--ajax Foundation