楼主,看看是不是你要的,改了三个文件
indexFram.htm
************************************************************************
<html>
<head>
<title>indexFram</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><frameset id="fram1" rows="80,*" frameborder="NO" border="0" framespacing="0">  //加了一个属性id=fram1
  <frame name="topFrame" scrolling="NO" noresize src="topFram.htm" bordercolor="#FF8000" >
  <frameset cols="126,866*" frameborder="NO" border="0" framespacing="0" rows="*"> 
    <frame name="leftFrame" scrolling="NO" noresize src="leftFram.htm" bordercolor="#FF8000">
    <frame name="mainFrame" src="mainFram.htm" bordercolor="#FF8000">
  </frameset>
</frameset>
<noframes><body bgcolor="#FFFFFF"></body></noframes>
</html>
------------------------------------------------------------------------
leftFram.htm
************************************************************************
<html>
<head>
<title>leftFram</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#99FF99">
<font size="2" onclick="top.fram1.cols = '0,*'">隐藏我</font> //加了一个点击事件隐藏框架
</body>
</html>
------------------------------------------------------------------------
mainFram.htm
************************************************************************
<html>
<head>
<title>mainFram</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body bgcolor="#666666" onmouseout="getX()">       //加鼠标事件,移到屏幕左边的时候打开隐藏了的框架
<script language="JavaScript">
<!--
function getX()
{
var x = event.x+document.body.scrollLeft;
 if(x<3)
 {
if(top.fram1.cols != "126,866*")
{
   top.fram1.cols = "126,866*";
}
 }
 }
//-->
</script>
</body>
</html>

解决方案 »

  1.   

    改了一个文件,基本上实现了,看看可不可以.leftFram.htm
    ------------------------------------------
    <html>
    <head>
    <title>leftFram</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="JavaScript">
    var locked = false;
    var hided = false;
    function setStatus(obj)
    {
    obj.innerText = (locked?"没固定":"已固定");
    locked = !locked;
    }function checkover()
    {
    if(!hided) return;
    top.document.all.tags("FRAMESET")[1].cols = "126,*";
    hided = false;
    }function checkout()
    {
    if(locked) return;
    top.document.all.tags("FRAMESET")[1].cols = "3,*";
    hided = true;
    }
    </script>
    </head><body bgcolor="#99FF99" onmouseover="checkover();" onmouseout="checkout();" onmousemove="checkover();" onfocus="checkover();" onblur="checkout();">
    <span style="cursor:hand;font-size:12px;" onclick="setStatus(this)">没固定</span>
    </body>
    </html>