XMLHttpRequest property
Syntax
| JavaScript | |
|---|
Property values
Type: Object
the XMLHttpRequest.Standards information
- XMLHttpRequest, Section 3
Remarks
Despite its name, this method does not return an XMLHttpRequest object directly. Instead, it returns an IHTMLXMLHttpRequestFactory, which can be used to create an XMLHttpRequest object.
If the FEATURE_XMLHTTPREQUEST feature has been disabled, this method will return a Variant of type null. See CoInternetIsFeatureEnabled.
If the cross-domain request feature has been disabled in Windows Internet Explorer, this method returns null.
XMLHttpRequest was introduced in Windows Internet Explorer 7
Examples
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();
console.log(oReq.statusText);
}
}
See also
Send comments about this topic to Microsoft
Build date: 11/29/2012