property:status;
return type:number
content:ใช้คืนค่าสถานะกรทำงานว่าการ request ถูกต้องหรือไม่
example:var xhr = new XMLHttpRequest ();
xhr.open ( "POST", "localhost/test.php" );
xhr.onreadystatechange = responseXHR;
xhr.setRequestHeader ( "Content-type", application/x-www-form-urlencoded" );
xhr.send ( "name=bamboo&pass=labcode" );
function responseXHR()
{
if ( xhr.readyState == 4 )
{
if ( xhr.status == 200 )
{
alert ( "complete" );
}
}
}
comment:ถ้าคืนค่า 200 คือการ request ถูกต้องสมบูรณ์
ถ้าคืนค่า 404 คือการ request ไม่ถูกต้องไม่สมบูรณ์