如果在JSP页面里~  用JS方法open出一个子窗体~~当子窗体修改完数据关闭的时候。让父窗体或者让父窗体的DIV刷新  JS方法应该怎么写

解决方案 »

  1.   

    获取父窗体的div:
    var fdiv=window.opener.document.getElementById("div1");
      

  2.   

    <a href="#" onclick="openWin();">dddd</a>
    <div id=div1></div>
    <script type="text/jscript">
    function openWin(){
        var win=window.open("http://www.csdn.net");
        document.getElementById("div1").innerHTML="win open";
        var timer=setInterval(function(){
            if(win.closed){
                document.getElementById("div1").innerHTML="win closed";
                clearInterval(timer);
            }
        },1000);
    }
    </script>