| responseXML | ใช้คืนค่าข้อมูลที่ response มาจาก server แบบ xml |
|---|
property:responseXML;
return type:string
content:ใช้คืนค่าข้อมูลที่ response มาจาก server แบบ xml โดย page ปลายทางจะต้อง echo ค่าออกมาเพื่อเป็นการ response ค่ากลับ
example:var xhr = new XMLHttpRequest (); xhr.open ( "GET", "localhost/test.php?param=value" ); xhr.onreadystatechange = responseXHR; xhr.send ( null ); function responseXHR() { if ( xhr.readyState == 4 ) { if ( xhr.status == 200 ) { alert ( xhr.responseXML ); } } }