打印本文 打印本文 关闭窗口 关闭窗口
页面导航隐藏层的打开关闭
作者:武汉SEO闵涛  文章来源:敏韬网  点击数682  更新时间:2009/4/23 11:15:15  文章录入:mintao  责任编辑:mintao

说明: 隐藏层的打开关闭

效果: 运行后查看!

代码:


<html>
<head>
<title>网页特效 隐藏层的打开关闭 网教中国教学网</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor=#FFFFFF >
<!-------------------------------->
<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>

<!---------------------------------->
</body>
</html>


打印本文 打印本文 关闭窗口 关闭窗口