window.showModalDialog( url, window ); 然后在弹开窗口中: 
window.dialogArguments 即为父窗口window对象的引用。想搞什么都可以了。

解决方案 »

  1.   

    看楼主的意思子窗口应该是用window.showModalDialog()弹出的模式对话框.
    父窗口中弹出时这么写:window.showModalDialog('子窗口.aspx',window,'....');
    注意第二个参数用window,这样你就把父窗口对象当做参数传递给了子窗口.
    然后在子窗口中就可以通过window.dialogArguments来引用父窗口对象了.
    就向楼上说的,你想怎么搞都行了...
    举个例子,你可以在子窗体关闭的时候刷新父窗体,可以这么写:
    window.dialogArguments.location.href=window.dialogArguments.location.href;
    window.focus();
    window.close();
    你也可以调用主窗口里的函数:
    window.dialogArguments.函数名();
      

  2.   

    上面两位都误解了我的意思,A 用window.showModalDialog()打开了B,B  用window.dialogArguments[0].open()打开了C,请问C关闭时怎么刷新B ?
      

  3.   

    例子
    1.htm
    ===========
    <title>1</title>
    <input type=button value="open 2" onclick="window.showModalDialog('2.htm',window);">
    <script>
    alert("1")
    </script>
    2.htm
    ===========
    <title>2</title>
    <frameset cols="0,*">
    <frame src="">
    <frame src="b.htm">
    </frameset>b.htm
    ==========
    <input type=button value="open 3" onclick="window.showModalDialog('3.htm',window);">
    <script>
    alert("我是2")
    </script>
    3.htm
    =========
    <title>3</title>
    <frameset cols="0,*">
    <frame src="">
    <frame src="c.htm" name="x">
    </frameset>
    c.htm
    =====
    <input type="button" value="refresh 2 and close me" onclick="window.dialogArguments.location='2.htm';window.parent.close()">
    注意:showModalDialog缓存的厉害,请清空缓存每次测试