设上框架为topFrame,下框架为bottomFrame,下框架bottomFrame中又有iframe1和iframe2,问两个问题:
1.topFrame点超链时,在bottomFrame中的iframe2中打开相应页面的代码如何写?
2.iframe1中点超链时,在同页的iframe2中打开相应页面的代码如何写?

解决方案 »

  1.   

    1.
    var bottomwin=parent.frames["bottomFrame"];
    bottomwin.frames["iframe2"].location.href=.....;
    2.
    对iframe1
    <base target =iframe2>
      

  2.   

    <a href="dd.aspx" target="Framename">ddd</a>
      

  3.   

    var bottomwin=parent.frames["bottomFrame"];<a href="<script>bottomwin.frames['rightFrame'].location.href='Register.aspx?id=R';</script>",target="bottomFrame">注册</a>这样不行!请指正。
      

  4.   

    <script>
    function openLink(url)
    {
        var bottomwin=parent.frames["bottomFrame"];
        bottomwin.frames['rightFrame'].location.href=url;
    }
    </script><a href="javascript:openLink('Register.aspx?id=R')">注册</a>
      

  5.   

    <a href="dd.aspx" target="Framename">ddd</a>