方法一:
使用js脚本:
function createXMLHttpRequest(){
if(window.XMLHttpRequest){
XMLHttpR = new XMLHttpRequest();
}else if(window.ActiveXObject){
try{
XMLHttpR = new ActiveXObject("Msxml2.XMLHTTP");
}catch(e){
try{
XMLHttpR = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e){
}
}
}
}
function sendRequest(url){
createXMLHttpRequest();
XMLHttpR.open("GET",url,true);
XMLHttpR.setRequestHeader("Content-Type","text/html;charset=gb2312");
XMLHttpR.onreadystatechange = processResponse;
XMLHttpR.send(null);
}
function processResponse(){
if(XMLHttpR.readyState ==4 &&
XMLHttpR.status == 200){
document.write(XMLHttpR.responseText);
}
}
方法二:
使用iframe框架:
frameborder="0" width="100%" scrolling="auto"
style="margin-top: -4px;"
onload="this.style.height=document.body.clientHeight-84"
缺点是,存在跨域访问的问题。