紧急求助!为什么这段代码有时候能正确运行,有时候会提示content未定义?
<script language='JavaScript'>
var xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
xmlHttp.open("post","link.aspx",true);
xmlHttp.OnReadyStateChange=function(){
if(xmlHttp.ReadyState==4&&xmlHttp.status==200){
content.innerHTML=xmlHttp.ResponseText;
}
}
xmlHttp.send();
</script>
<div id="content"></div>