menu.aspx页面中有3个框架分别是:head框架,left框架,right框架
问题:当我单击head框架中bottom按钮时同时更改left框架和right框架的scr链接url
要求不在后台里面写,用javascript写或者其他的方法写都行!谢谢

解决方案 »

  1.   

    head 中的按钮<input id="Button1" type="button" value="选择" onclick="change();"/>js方法:function change()
    {
       window.parent.document.getElementById("leftFrameId").src="default2.aspx";
       window.parent.document.getElementById("rightFrameId").src="default3.aspx";}
      

  2.   

    用javascript写:parent.框架的name.location.href="url";放在按钮的onclick
      

  3.   

     window.parent.framse["leftFrameName"].location = "default2.aspx";
     window.parent.framse["rightFrameName"].location ="default3.aspx";<frame name="leftFrameName"/>
    <frame name="rightFrameName"/>
      

  4.   

    <input id="bTnTO" type="button" value="确定" onclick="Turn();"/>function Turn()
    {
      parent.name1.location.href="Page1.aspx";
      parent.name2.location.href="Page2.aspx";
    }
      

  5.   


    <!--menu页-->
    <frameset rows="20%,*">
        <frame src=top.htm />
        <frameset cols="30%,*">
            <frame id="left" src="left.htm" />
            <frame id="right" src="right.htm" />
        </frameset>
    </frameset>
    <!--top页-->
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>无标题页</title>
        <script type="text/javascript">
            function change(){
                window.top.document.getElementById("left").src="Assembly.aspx";
                window.top.document.getElementById("right").src="gridview.aspx";
            }
        </script>
    </head>
    <body>
    top页面
        <input id="Button1" type="button" value="button" onclick="change()" />
    </body>
    </html>