代码没办法执行,页面时空的,,555.asp不会空。
<script type="text/javascript" language="javascript">var http_request = false;
function makeRequest(url,obj)
{
http_request = false;
if (window.ActiveXObject) {
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
http_request = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
}
if (!http_request) {
alert('Giving up :( Cannot create an XMLHTTP instance');
return false;
}
http_request.onreadystatechange = alertContents;
http_request.open('GET', url, true);
http_request.send(null);
function alertContents() {
document.getElementById(obj).innerHTML="<font size=2>正在加载数据,请稍候...</font>";
if (http_request.readyState == 4) {
if (http_request.status == 200) {
document.getElementById(obj).innerHTML=http_request.responseText;
} else {
alert('There was a problem with the request.');
}
}
}
}
</script>
<body onload="makeRequest("555.asp","bb")" id="body">
<div id="bb" align="center" width=930 height="100%"></div>
</body>