A在浏览器地址是显示a.html
B是由A上的方法window.open('b.html')
当关闭b.html 
浏览器的地址变成c.html并打开

解决方案 »

  1.   

             var i = window.open("test.html");
    window.onblur = function(){
    parent.location.href = "http://www.google.com.hk";
    };
      

  2.   

    如果是window.open打开的新窗口的话,
    也就没有parent.了吧,
    感觉不好使wan
      

  3.   

    window.opener.location.href = 'xx.html'
      

  4.   

    var i = window.open("test.html");
    window.onblur = function(){
    window.opener.location.href = "http://www.google.com.hk";
    };
      

  5.   

    有一个winodw.onunload方法 不过无法判断是刷新还是关闭页面
      

  6.   

    a.html<html>
    <script>
    function doSomething()
    {
    window.open("b.html");
    }
    </script>
    <body>
    <input type="button" onclick="doSomething()"/>
    </body>
    <html>b.html
    <html>
    <script>
    window.onunload=function(){window.opener.location = "http://www.baidu.com";}
    </script>
    <body>
    <input type="button" onclick="doSomething()"/>
    </body>
    <html>注意。这个是在IE下工作的,别的浏览器是不支持操作父窗口的