a.html<SCRIPT LANGUAGE="JavaScript">
function abc(r)
{
document.getElementById("atext").value = r;
document.body.removeChild(document.getElementById("div"));
}
</SCRIPT>
<body>
<input type="text" value="" name="atext" id="atext"><BR>
<div id="div"><iframe src="b.html"></iframe></div><BR>
<input type="button" value="document" onclick="alert(document.body.innerHTML)">
</body>b.html<body>
<form name="bform" onsubmit="window.top.abc(document.bform.btext.value);return false;">
<input type="text" name="btext" value=""><input type="submit" value="submit">
</form>
</body>

解决方案 »

  1.   

    打开a页面中的层后 如何将除本层以外其他地方不可用变灰色 关闭改层后又可用 如同很多div弹出窗口效果一样  怎么实现???
      

  2.   

    加一个遮罩层!覆盖掉原来的A页面!b的层比遮罩高,这样不会遮罩B
      

  3.   

    在B的适当事件下调用
    window.parent.document.getElementById("pageA textbox ID").value="value";
    window.parent.document.body.removeChild(window.parent.document.getElementById("divid"));