Instantiates the XMLHttpRequest object for the window.
Syntax
[ oRequest = ] window.XMLHttpRequest
Possible Values
oRequest |
Object that
receives the XMLHttpRequest. |
The property is read-only.
The property has no default value.
Remarks
If the cross-domain request feature has been disabled in Windows Internet Explorer, this method returns null.
XMLHttpRequest was introduced in Internet Explorer 7
Example
The following script demonstrates how to create and use the XMLHttpRequest object:
if (window.XMLHttpRequest)
{
var oReq = new XMLHttpRequest();
if (oReq) {
oReq.open("GET", "http://localhost/test.xml");
oReq.send();
alert(oReq.statusText);
}
}
Standards Information
This property is defined in
The XMLHttpRequest Object (W3C Working Draft) .
Applies To