如何让框架页面有top,left暂时隐藏
框架代码------index.jsp
<frameset rows="75,*" cols="*" frameborder="no" border="1" framespacing="0" id="headFrame">
<frame name="topFrame" id="topFrame" scrolling="no" src="top.jsp" frameborder="0" noresize />
<frameset rows="31,*" cols="*" border="0" framespacing="0">
<frame name="AmysqlTag" id="AmysqlTag" scrolling="No" frameborder="0" noresize />
<frameset rows="*" cols="223,*" border="0" framespacing="0" id="middleFrame">
<frame name="AmysqlLeft" id="AmysqlLeft" frameborder="0" />
<frame name="AmysqlContent" id="AmysqlContent" frameborder="0" scrolling="no"/>
</frameset>
</frameset>
</frameset>
这是我上网找的方法,可是老是提示parent.headFrame‘为空或不是对象'
右边子窗口代码------1.jsp
<input type="button" value="expand" onclick="DoExpand()">
<script language="javascript">
function DoExpand()
{
parent.middleFrame.cols="0,*";
parent.topFrame.rows="0,*,0";
}
</script>
人穷分少,真心希望高手帮忙,谢谢
------解决方案--------------------
q.html
<frameset rows="75,*" cols="*" frameborder="no" border="1" framespacing="0" name="headFrame">
<frame name="topFrame" id="topFrame" scrolling="no" src="top.jsp" frameborder="0" noresize />
<frameset rows="*,31" cols="*" border="0" framespacing="0">
<frameset rows="*" cols="223,*" border="0" framespacing="0" name="middleFrame">
<frame name="AmysqlLeft" id="AmysqlLeft" frameborder="0" src="top.jsp" />
<frame name="AmysqlContent" id="AmysqlContent" frameborder="0" scrolling="no" src="1.html"/>
</frameset>
<frame name="AmysqlTag" id="AmysqlTag" scrolling="No" frameborder="0" noresize src="top.jsp"/>
</frameset>
</frameset>
1.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<input type="button" value="expand" onclick="DoExpand()">
</body>
</html>
<script language="javascript">
function DoExpand()
{
parent.document.all('headFrame').rows="0,*";
}
</script>
你建成html 在本地运行一下 我点按钮上面就隐藏了