建了一个有top,left,right框架的网页,如何通过top上的一个连接来关闭left页面啊!在线等…解决就结贴
我在top上面放置了一个关闭导航树的连接,请问如何关闭left页面。还放置了一个打开导航树的连接,如何打开左历的导航树呢。

解决方案 »

  1.   

    是不是象CSDN上的啊?
    可以问斑竹啊。
      

  2.   

    参考:
    frame中:  window.parent.frames["framename"].document.location.href=url;
    iframe中:document.["framename"].document.location.href=url;
    这个是指框架执行页面的,改一下就是close了。
      

  3.   

    我是想关闭左边页面,然后右边页面就变大,就像CSDN一样.一打开左边页面,右边页面也相应变小.想实现这个功能.请大家多帮帮忙.谢谢!
      

  4.   

    参考:
    frame中:  javascript:parent.framename.style.width=0;
      

  5.   

    main.htm
    <frameset cols='120,16,*' rows='*' frameborder='NO' border='0' id=oa_frame >
    <frame name=top noResize scrolling=no src="" target="middle">
    <frame name=middleframe src='left.htm' scrolling='NO' frameborder='NO' noresize>
    <frame name=bottom scrolling=no src="">
    <noframes>
    </noframes>
    Left.htm
    <html>
    <head>
    <title>button_title_l</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script>
    function oa_tool(){
    if(window.parent.oa_frame.cols=="0,16,*"){
    frameshow.src="images/p_1.gif";
    oa_tree.title="隐藏工具栏"
    window.parent.oa_frame.cols="120,16,*";
    }
    else{
    frameshow.src="images/p_2.gif";
    oa_tree.title="显示工具栏"
    window.parent.oa_frame.cols="0,16,*";}
    }
    </script>
    </head>
    <body text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" bgcolor="#CCCCCC">
    <table width="16" border="0" height="100%" cellpadding="0" cellspacing="0" align="left">
      <tr align="center">
        <td background="images/bg_1.gif">
          <div id=oa_tree onclick="oa_tool();" title=隐藏工具栏><img id=frameshow src="images/p_1.gif" width="9" height="50" ></div>
          </td>
      </tr>
    </table>
    </body>
    </html>The Important Code is:
    window.parent.oa_frame.cols="120,16,*";
      

  6.   

    关闭不了,CSDN也是把它隐藏了,也就是把col设为0
      

  7.   

    cyokin(呼吸の亜) ( ) 说的可以啊。
    赞成。也学了一招。谢谢
      

  8.   

    搞定,结贴.非常感谢"cyokin(呼吸の亜)"大哥.