-------------------------
|           A           |
|=======这条不可见======|
|    |                  |
|    |                  |
|    |                  |
| 隐藏/显示    C        |
|    |                  |
| B  |                  |
|    |                  |
|    |                  |
-------------------------共有三个页面(A、B、C)A分隔线是隐藏的,也不可以拖动。
当点击B页的隐藏时,B页隐藏,分隔线跳到最左边,上面的“隐藏”显示成“显示”。
B页的分隔线是可以拉动的。

解决方案 »

  1.   

    主框架页:
    <frameset rows="83,*" framespacing="0" border="0" frameborder="0" id="mainFrame">
    <frame name="banner" scrolling="no" noresize target="menu" src="top.asp" style="border-style:solid; border-width:0px; ">
    <frameset cols="202,*">
    <frame name="menu" target="main" src="menu.asp" scrolling="auto" style="border: 1px solid #5F65BA; ">
    <frame name="main" src="index.asp" scrolling="auto" style="padding:0; border:1px outset #5F65BA; " target="_self">
    </frameset>
    <noframes>
    </noframes>
    </frameset>
    main页:
    <Html>
    <script language="javascript">
    function openMenu()
    {
        if(window.parent.mainFrame.cols == "83,*")
        {
            window.parent.mainFrame.cols = "0,*";
            mymenu.innerText = "显示菜单";
        }
        else
        {
            window.parent.mainFrame.cols = "0,*";
            mymenu.innerText = "显示菜单";
        }
    }
    </script>
    <Body>
    <Div align="center">
    <a id="mymenu" href="#" onclick="return openMenu()">
    隐藏菜单
    </a>
    </Div>
    </Body>
    </Html>
    试一下
      

  2.   

    index.htm<html>
    <head>
    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>frame框架的显示隐藏操作 - 51windows.net</title>
    </head><frameset name="full" rows="64,*,64">
      <frame name="top" scrolling="no" xnoresize target="contents" src="top.htm">
      <frameset cols="25%,*" name="cen">
        <frame name="contents" target="main" src="left.htm">
        <frame name="main" src="main.htm">
      </frameset>
      <frame name="bottom" scrolling="no" xnoresize target="contents" src="bottom.htm">
      <noframes>
      <body>  <p>此网页使用了框架,但您的浏览器不支持框架。</p>  </body>
      </noframes>
    </frameset></html>
      

  3.   

    另外,下面的这个是例子..直接拷贝可以运行..===============================
    frame.htm
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><frameset cols="80,*" frameborder="NO" border="0" framespacing="0" id="myFrame">
      <frame src="left.htm" name="leftFrame" frameborder="yes" scrolling="NO" noresize>
      <frame src="main.htm" name="mainFrame" frameborder="yes" scrolling="auto" bordercolor="#000000">
    </frameset>
    <noframes><body>
    </body></noframes>
    </html>left.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    </body>
    </html>main.htm<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <body>
    <script language="javascript">
    function openMenu()
    {
        if(window.parent.myFrame.cols == "80,*")
        {
            window.parent.myFrame.cols = "0,*";
            mymenu.innerText = "显示菜单";
        }
        else
        {
            window.parent.myFrame.cols = "80,*";
            mymenu.innerText = "显示菜单";
        }
    }
    </script>
    <Body>
    <Div align="center">
    <a id="mymenu" href="#" onclick="return openMenu()">
    隐藏菜单
    </a>
    </Div>
    </body>
    </html>
      

  4.   

    main.htm<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>main - 51windows.net</title>
    </head><body>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function shtop(){
    if (parent.full.rows.indexOf("0,*,")!=-1){
    parent.full.rows="64,*,"+parent.full.rows.split(",")[2]
    document.getElementById("shtop").value="隐藏上部";
    }
    else{
    parent.full.rows="0,*,"+parent.full.rows.split(",")[2]
    document.getElementById("shtop").value="显示上部";
    }
    }
    function shleft(){
    if (parent.cen.cols=="0,*"){
    parent.cen.cols="25%,*,"
    document.getElementById("shleft").value="隐藏左部";
    }
    else{
    parent.cen.cols="0,*"
    document.getElementById("shleft").value="显示左部";
    }
    }
    function shbottom(){
    if (parent.full.rows.indexOf(",*,0")!=-1){
    parent.full.rows=parent.full.rows.split(",")[0]+",*,64"
    document.getElementById("shbottom").value="隐藏下部";
    }
    else{
    parent.full.rows=parent.full.rows.split(",")[0]+",*,0"
    document.getElementById("shbottom").value="显示下部";
    }
    }
    function maxmain(){
    if (parent.full.rows=="0,*,0"){
    parent.full.rows="64,*,64"
    parent.cen.cols="25%,*"
    document.getElementById("maxmain").value="隐藏左上下";
    document.getElementById("shtop").value="隐藏上部";
    document.getElementById("shleft").value="隐藏左部";
    document.getElementById("shbottom").value="隐藏下部";
    }
    else{
    parent.full.rows="0,*,0";
    parent.cen.cols="0,*";
    document.getElementById("maxmain").value="显示左上下";
    document.getElementById("shtop").value="显示上部";
    document.getElementById("shleft").value="显示左部";
    document.getElementById("shbottom").value="显示下部";
    }
    }
    //-->
    </SCRIPT>
    <input type="button" name="maxmain" id="maxmain" onclick="maxmain();" value="隐藏左上下">
    <input type="button" name="shtop" id="shtop" onclick="shtop();" value="隐藏上部">
    <input type="button" name="shleft" id="shleft" onclick="shleft();" value="隐藏左部">
    <input type="button" name="shbottom" id="shbottom" onclick="shbottom();" value="隐藏下部"></body></html>