网页特效:隐藏层的打开关闭
<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>
width=180>
color=#ffffff>你看,这是一个隐藏的层,不过现在你可以看到了。
href="javascript:toExit('hide','boysoft')">关闭此窗口
0条评论