我想做了个T型frame框架,想在top层做个按钮来控制 显示/隐藏 left frame框架(左边框架)?

Geyond 2002-07-06 12:37:58
我这样写parent.mainFrameset.LowFrameset.cols="0,*"
却不行呢?(mainFrameset 是最外层的框架名,lowFrameset是下面包含两个frame的Frameset名
...全文
99 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
fason 2003-05-08
  • 打赏
  • 举报
回复
try:
<SCRIPT LANGUAGE=javascript>
function SHFrame(){
top.document.all.xframe.cols ="0,*";
}
</SCRIPT>
zhangguagua 2003-05-08
  • 打赏
  • 举报
回复
up
Geyond 2002-07-09
  • 打赏
  • 举报
回复
这里有个两层的frameset按照上面说的做了。。但还是不行
框架文件:
<html>
<head>
<title>Customer Web Manager</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset name ="topframes" rows="39,*" cols="*" frameborder="YES" MARGINWIDTH="0" MARGINHEIGHT="0" border="2" framespacing="2" bordercolor="#000000">
<frame name="topFrame" scrolling="NO" src="header.asp" >
<frameset name ="xframe" id ="xframe" cols="112,*" rows="*" >
<frame name="leftFrame" scrolling="NO" src="left.html" bordercolor="#000000" MARGINWIDTH="0" MARGINHEIGHT="0" >
<frame name="mainFrame" src="Login.htm" MARGINWIDTH="0" MARGINHEIGHT="0" >
</frameset>
</frameset>
<noframes>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>


控件的top frame文件:
<html>
<head>
<title>Customer Manager Header</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Style.css" type="text/css">
<style type="text/css">
<!--
-->
</style>
</head>
<SCRIPT LANGUAGE=javascript>


function SHFrame(){
parent.document.all.leftFrame.cols = "0,*";
}
</SCRIPT>

<body bgcolor="#000000" text="#FFFFFF" TOPMARGIN="0" BOTTOMMARGIN=0 LEFTMARGIN=5 RIGHTMARGIN=5>
<table width="100%" border="0" cellpadding="0" cellspacing="0" height="35">
<tr>
<td class="MainTitle" width="35%" height="10">click</td>
<td width="24%" height="9" valign="top"><font size="-2"></font></td>
<td width="10%" height="10"><font size="-2"></font></td>
<td width="20%" nowrap height="10">
<div align="right"><i><font size="-1"> </font></i></div>
</td>
<td width="11%" nowrap height="10">
<div align="left"><font size="-1"> </font></div>
</td>
</tr>
<tr>
<td width="35%" height="21" class="clsLink">
<div align="left"><font size="-1"><a href="#" onclick="SHFrame();">Show/Hide
Catogary</a></font></div>
</td>
<td width="24%" height="9" valign="top"><font size="-1"></font></td>
<td colspan="2" nowrap height="21" class="clsLink">
<div align="right"><font size="-1">   | </font></div>
</td>
<td width="11%" nowrap height="21" class="clsLink">
<div align="right"><font size="-2"> </font></div>
</td>
</tr>
</table>
</body>
</html>
meizz 2002-07-08
  • 打赏
  • 举报
回复
给你一个精典的例子:
http://bbs5.163.com/tech
希默软件 2002-07-06
  • 打赏
  • 举报
回复
看这个,经典斑竹的页子
http://www.blueidea.com/user/myhyli/
chenzengxi 2002-07-06
  • 打赏
  • 举报
回复
哦,上面错了.
parent.document.all.LowFrameset.cols = "0,*";

chenzengxi 2002-07-06
  • 打赏
  • 举报
回复
应该这样:
parent.document.all.mainFrameset.cols = "0,*";

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧