隐藏层的打开关闭

<!-- 要实现此效果需要 2 个步骤: -->

<!-- 第 1 步: -->
<!-- 把<BODY>中的属性代码改为: -->

<BODY bgcolor=#FFFFFF>



<!-- 第 2 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<script language=javascript>
ie4=(document.all)?true:false;
ns4=(document.layers)?true:false;

function toExit(){
var args=toExit.arguments;
var visible=args[0];
if(ns4){
theObj=eval("document.layers[/'"+args[1]+"/']");
if(theObj)theObj.visibility=visible;
}
else if(ie4){
if(visible=='show')visible='visible';
if(visible=='hide')visible='hidden';
theObj=eval("document.all[/'"+args[1]+"/']");
if(theObj)theObj.style.visibility=visible;
}

}

</script>
<div id=boysoft
style="HEIGHT: 80px; LEFT: 309px; POSITION: absolute; TOP: 150px; VISIBILITY: hidden; WIDTH: 180px; Z-INDEX: 1">
<table bgcolor=#356f66 border=1 cellpadding=0 cellspacing=0 height=80
width=180>
<tbody>
<tr>
<td height=65 width="100%">
<table border=0 cellpadding=0 cellspacing=0 height=80 width="99%">
<tbody>
<tr>
<td height=57> <font
color=#ffffff>你看,这是一个隐藏的层,不过现在你可以看到了。<b></b></font></td>
</tr>
<tr align="center">
<td height=23 width="100%"><a
href="javascript:toExit('hide','boysoft')"><font color=white>关闭此窗口</font></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<a href="javascript:toExit('show','boysoft')"><font color="#0000FF">打开隐藏层</font></a>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值