|
XMLHTTP對(duì)象參考
XMLHTTPRequest 對(duì)象 XMLHTTPRequest 成員 onreadystatechange readyState responseBody responseStream responseText responseXML status statusText abort getAllResponseHeaders getResponseHeader open send setRequestHeader
responseXML將響應(yīng)信息格式化為Xml Document對(duì)象并返回 語(yǔ)法var objDispatch = oXMLHttpRequest.responseXML; Examplevar xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
xmlhttp.open("GET", "http://localhost/books.xml", false);
xmlhttp.send();
alert(xmlhttp.responseXML.xml);
備注變量,此屬性只讀,將響應(yīng)信息格式化為Xml Document對(duì)象并返回。如果響應(yīng)數(shù)據(jù)不是有效的XML文檔,此屬性本身不返回XMLDOMParseError,可以通過(guò)處理過(guò)的DOMDocument對(duì)象獲取錯(cuò)誤信息。 參考 |
|
|
來(lái)自: pengyan > 《我的圖書(shū)館》