📄 说明.txt
字号:
不知道大家是否注意到。dreamweaver和有些网站,
为了更明了的表示页面空间,往往需要把一些暂时
不用的框架隐藏起来,
例如www.newsmth.com,新水木清华
www.ccidnet.com赛迪网论坛
他们是如何实现的呢?
首先定义框架集:
<FRAMESET name="mainframe" id="mainframe" BORDER="0" FRAMEBORDER="0" FRAMESPACING="0" COLS="180,11,*">
<FRAME SRC="1.htm" NAME="side" TARGET="main">
<frame scrolling=no noresize="true" name=toogle marginwidth=0 marginheight=0 src="2.htm">
<FRAME SRC="3.htm" NAME="main">
</FRAMESET>
原来网站是使用了一个可以隐藏框架集的js控件:
示例代码如下:
<html>
<head>
<style type="text/css">
.o1 {background-color:#718BD6; font-size:10px; color:#ffffff; text-decoration:none;}
body {margin: 0px; background-color: #F6F6F6; }
</style>
<script language="javascript">
<!--
var iniCols, noCols, o_mf, o_ms, s;
function ini() {
o_mf = parent.document.getElementById("mainframe");
o_ms = document.getElementById("menuSwitch");
noCols = iniCols = o_mf.cols;
if ((pos = noCols.indexOf(",")) != -1) {
noCols = "0" + noCols.substring(pos);
}
s = false;
}
function changeLeft(){
s = !s;
o_mf.cols = s ? noCols : iniCols;
o_ms.innerHTML = s ? "►" : "◄";
}
//-->
</script>
</head>
<body onload="ini()">
<table width=100% height=100% border=0 cellpadding=0 cellspacing=0>
<tr>
<td>
<a href="javascript:changeLeft();" class="o1" id="menuSwitch">◄</a>
</td>
</tr>
</table>
</body></html>
阁下可以定义三个框架集!其中以上页面代码为中间一个!
将要时常隐藏的一个命名为mainframe!
另一个是第三个。
好东西吧!
如果各位认为这个代码有用!请评论
本人是学汉语的
个人组装网站www.easyhelp.cn易帮工作室。
欢迎各位知道和指导,
但请高手不要黑我!!!!!
附的例子。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -