我现在有一个页面a.html(这个是父页面),另外一个页面b.html(子页面)a.html页面有个链接(<a href="b.html" target="_blank">打开子页面</a>),链接到子页面,
现在的问题是,点击a.html里面的链接,打开b.html,b.html页面一加载的时候,要对a.html页面进行操作,比如说一个地址(http://www.baidu.com),然后a.html的页面就变成http://www.baidu.com这个页面了
有做过这样的例子吗,帮忙下

解决方案 »

  1.   

    如果是iframe框架方式的话用parent.document.geteE...
      

  2.   

    a打开b,用window.open("b.htm"),b的onload事件里面用window.opener去操作A
      

  3.   

    <script type="text/javascript">
    function openPage()
    {
        window.open("b.htm");
    }
    </script><a href="#" onclick="openPage()">打开子页面</a>====================function changeParent()
    {
         window.opener.location="http://www.baidu.com";
         window.opener.reload();
    }