<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
>
<div id="bb" name="bb"
onClick="makeRequest(this.value,'bb')">
<iframe src=555.asp width=800 height=6000 scrolling="no"></iframe>
</div>
</body>
可以了。谢谢。