日期:2014-05-16  浏览次数:20407 次

js子窗口父窗口问题
假设有一个父窗口下有两个子窗口,目前页面在其中一个子窗口下,如何操作另一个子窗口

------解决方案--------------------
父窗口 中 打开时用:
win1 = window.open(...);
win2 = window.open(...);

子窗口调用:
opener.win2.document.XXXX
------解决方案--------------------
main.html
HTML code
<html>
<body>
    <iframe src="sub1.html" frameborder="0"></iframe>
    <iframe src="sub2.html" frameborder="0"></iframe>
</body>
</html>

------解决方案--------------------
探讨
main.html

HTML code

<html>
<body>
<iframe src="sub1.html" frameborder="0"></iframe>
<iframe src="sub2.html" frameborder="0"></iframe>
</body>
</html>

sub1.html

HTML code

<h……