XmlHttp.CN
XMLHTTP对象参è€?/div>
XMLHTTPRequest 对象 XMLHTTPRequest 成员 onreadystatechange readyState responseBody responseStream responseText responseXML status statusText abort getAllResponseHeaders getResponseHeader open send setRequestHeader

responseText

将响应信息作为字符串返回

语法

strValue = oXMLHttpRequest.responseText;

Example

var xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0");
xmlhttp.open("GET", "http://localhost/books.xml", false);
xmlhttp.send();
alert(xmlhttp.responseText);

备注

变量,此属性只读,将响应信息作为字符串返回ã€?br /> XMLHTTP尝试将响应信息解码为Unicode字符串,XMLHTTP默认将响应数据的编码定为UTF-8,如果服务器返回的数据带BOM(byte-order mark),XMLHTTP可以解码任何UCS-2 (big or little endian)或者UCS-4 数据。注意,如果服务器返回的是xml文档,此属性并不处理xml文档中的编码声明。你需要使ç”?a href="responsexml.html" title="">responseXML来处理ã€?/p>

参è€?/h2>

responseBody 属æ€?/a>
responseText 属æ€?/a>
responseXML 属æ€?/a>