在A中这样定义iframe的B:<iframe src=b.htm name=B_name></iframe>在D中这样定义关闭:<button onclick="window.close(); B_name=window.open('b.htm','B_name')">关闭</button>

解决方案 »

  1.   

    我想在F关闭时自动刷新B,而不是点击按钮我试着用  <body onUnload="parent.opener.location.reload();">但刷新的却是C而不是F
      

  2.   

    显然parent.opener.location不正确,
      

  3.   

    假设你的iframe B的name 为 B
    <body onUnload="opener.opener.parent.B.location.reload()">不过,关闭窗口的话,还是完善一下哦.<script>
    //判断是刷新还是关闭
    function CloseOpen() {
    if(event.clientX<=0 && event.clientY<0) {
    //alert("new");
    window.open("http://www.baidu.com",null,'');
    }
    else {
    //alert("notnew");
    }
    }
    </script>
    <body onunload="CloseOpen()">
      

  4.   

    f页<body onUnload="opener.top.B.location.reload()">
      

  5.   

    绕口令呀?
    关闭触发函数,open窗口用opener控制,iframe父窗口用parent.xxx控制
      

  6.   

    试试
    <body onUnload="parent.opener.opener.B.location.reload()">