有个pageA,  点击pageA内的按钮   弹出页面pageB, pageB里面有一个链接<a href="xxx.html">我想点击<a href="xxx.html">,   pageA页面跳转到xxx.html,pageB关闭
请高手解答

解决方案 »

  1.   

    a href="javascript:window.parent.location.href='XXX.HTML';window.close();"
    好像是,0 0 
      

  2.   

    试试
    <a href="javascript:window.opener.location.href='XXX.HTML';window.close();"
      

  3.   


    <script>
    //第一个窗口
    var child = window.open("info.html","_blank","width=200,height=200,toolbar=no");</script>
    <body">
    </body>
    <script>
    //第二个窗口 info.html
    function change(){
    window.close();
    window.opener.location.href = "http://www.baidu.com";//让父亲窗口跳转到baidu

    }
    </script><body>
    <a href="#" onclick="change()">第一页跳转到baidu</a>
    </body>
      

  4.   


    //父窗口弹出子窗口代码
    var result = window.showModalDialog("dialog.htm", "", "dialogHeight:250px;dialogWidth:550px;status:no; help:no;scroll:no");
                if (result != "") {
                    window.location.href = result;
                }//子窗口超链接
    <a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a>
      

  5.   

    使用window.opener和window.returnValue都是可以的.
    使用window.opener:
    子窗口中<a href="javascript:window.opener.location.href='XXX.aspx';window.close();">跳转</a>使用window.returnValue:
    父窗口中var url=window.showModalDialog("2.html","","dialogWidth:750px;dialogHeight:750px;center:1");
    if (url!=undefined)
    {
      window.location.href=url;
    }子窗口中:<a href="javascript:window.returnValue='XXX.aspx';window.close();">跳转</a>