是否可以在外部HTML页面的div
中显示?
类似的东西:
document.getElementById('pop_up_main').innerHTML = 'index.html';
答案 0 :(得分:0)
function loadextPage()
{
var xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById('pop_up_main').innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","index.html",true);
xmlhttp.send();
}
你的HTML身上的:
<body onload="loadextPage()">