XMLHTTPRequest的属性和方法简介

作者:凯旋网络来源:凯旋网络
Not Supported
         // 备注:长整形,此属性只读,返回当前请求的http状态码,此属性仅当数据发送并接收完毕后才可获取。 
       alert(xmlhttp.status);
       
       // 属性:statusText
       // 返回当前请求的响应行状态
       // 语法:strValue = oXMLHttpRequest.statusText;
       // 备注:字符串,此属性只读,以BSTR返回当前请求的响应行状态,此属性仅当数据发送并接收完毕后才可获取。 
       alert(xmlhttp.statusText);
    }
}
//-->
</script>
</head>
<body>
<form name="frmTest">    
    <input name="myButton" type="button" value="Click Me" onclick="PostOrder(''http://localhost/example.htm'');">
</form>    
</body>
</html>

  • 广告推荐