
XMLHTTP瀵硅薄鍙傝?/div>
getResponseHeader
浠庡搷搴斾俊鎭腑鑾峰彇鎸囧畾鐨刪ttp澶?/p>
璇硶
strValue = oXMLHttpRequest.getResponseHeader(bstrHeader);
Example
var xmlhttp = new ActiveXObject("MSXML2.XMLHTTP.3.0"); xmlhttp.open("GET", "http://localhost/sample.xml", false); xmlhttp.send(); alert(xmlhttp.getResponseHeader("Server"));杈撳嚭http澶翠腑鐨剆erver鍒楋細褰撳墠web鏈嶅姟鍣ㄧ殑鐗堟湰鍙婂悕绉般?
澶囨敞
褰搒end鏂规硶鎴愬姛鍚庢墠鍙皟鐢ㄨ鏂规硶銆傚鏋滄湇鍔″櫒杩斿洖鐨勬枃妗g被鍨嬩负"text/xml", 鍒欒繖鍙ヨ瘽xmlhttp.getResponseHeader("Content-Type");灏嗚繑鍥炲瓧绗︿覆"text/xml"銆傚彲浠ヤ娇鐢╣etAllResponseHeaders鏂规硶鑾峰彇瀹屾暣鐨刪ttp澶翠俊鎭?