本帖最后由 happy175 于 2010-08-18 11:37:22 编辑

解决方案 »

  1.   

    parent.frame.cols="0,7,*";
    用window.parent.frame.cols
    如果不行就用window.parent.frames["frameName"]
      

  2.   

    parent.frame.cols 改一下,
    改成 parent.document.getElementById(framesetid).cols=……
    使用document.getElementById(framesetid)获取frameset对象,注意framesetid是ID号,不是name
    试试看行不应为不知道你的页面结构,只能猜了。
    parent 是指向上一层
      

  3.   

    在IE里,可以直接使用ID或者name作为元素本身的DOM对象,应该是这个问题了
      

  4.   

    我给个演示的你看一下吧
    http://www.websjy.com/club/html/html.html上面的代码就是center.html文件中的谢谢帮我
      

  5.   

    我说对了,呵呵
    改成
    parent.document.getElementById('frame')
    就可以了
      

  6.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=GB2312">
    <title>无标题文档</title>
    <style>
    html, body {margin:0;padding:0;height:100%;}
    </style>
    <script language="JavaScript" type="text/JavaScript">
    function preloadImg(src)
    {
    var img=new Image();
    img.src=src
    }
    preloadImg("images/f_bar.gif");
    var displayBar=true;
    function switchBar(obj)
    {
    if (displayBar)
    {
    parent.document.getElementById('frame').cols="0,7,*";
    displayBar=false;
    obj.src="images/e_bar.gif";
    obj.alt="打开左边管理导航菜单";
    }
    else{
    parent.document.getElementById('frame').cols="160,7,*";
    displayBar=true;
    obj.src="images/f_bar.gif";
    obj.alt="关闭左边管理导航菜单";
    }
    }
    </script>
    </head><body scroll="no">
    <table width="7" border="0" cellpadding="0" cellspacing="0" height="100%">
        <tbody><tr>
       <td onmouseover="this.style.backgroundColor='#C8F2FB'" onmouseout="this.style.backgroundColor='#ffffff'" style="cursor: pointer; background-color: rgb(255, 255, 255);" align="right"><img src="center_data/f_bar.gif" style="cursor: pointer;" alt="关闭左边管理导航菜单" onclick="switchBar(this)" width="6"></td>
        </tr>
       </tbody></table>
    </body></html>
    center页