<div id="content">
</div><script type="text/javascript" language="javascript">
var loadOther=function(url){
var xmlhttp=new ActiveXObject("Microsoft.XmlHttp");
xmlhttp.open("get",url,false); xmlhttp.onreadystatechange=function(){
if(xmlhttp.readystate==4){
if(xmlhttp.status==200){
content.innerHTML=xmlhttp.responseBody;
}else{
alert("can't open the url");
}
}
}
xmlhttp.send();
}
</script><input type="button" onclick="loadOther('http://www.yahoo.com/');" value="fill content">测试通过,你可能需要转换一下编码的问题。