在当前页设一个隐藏的iframe:
<iframe id=theIframe width=0 height=0></iframe>用 theIframe.location.href = "你要访问的另一页面";然后用 theIframe.document.body.innerHTML就是页面的内容了。
<iframe id=theIframe width=0 height=0></iframe>用 theIframe.location.href = "你要访问的另一页面";然后用 theIframe.document.body.innerHTML就是页面的内容了。
例子:
function doInsertTable(){
var dotable=showModalDialog("editor_table.htm",false,"dialogWidth:200px;dialogHeight:156px;status:0;");
if (dotable!=undefined){
doc.body.innerHTML=doc.body.innerHTML+dotable;
}else{
return false;
}
}
通过dotable返回另一页面的值