法一: //指定时间隐藏层 function hiddenDiv(layer, sec){ if(sec < 1) sec = 3; sec = (sec<1 ? 3 : sec) * 1000; setTimeout("document.getElementById('" + layer + "').style.display = 'none';", sec); } 法二: function hideDiv(id){ document.getElementById(id).style.display = "none"; } function delayedHide(id, time){ var fn = function(){ hideDiv.apply(this, [id]); } setTimeout(fn, time); } delayedHide("mydiv", 2000); 第二种方法没有试验过,不知能否成功,大家不仿参考一下
Browsing the archives for the 层 tag
0 Comments
tagged javascript, 层
-
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] http://blog.haohtml.com/archives/124...
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] Nginx虚拟主机配置 [...]...
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] nginx 虚拟目录的配置 [...]...
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] centos下安装php-json [...]...
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] 在CentOS 5.5上安装MongoDB [...]...
-
[教程]Centos下安装lnmp教程(最新版2012-02-05) | haohtml's blog: [...] 管理员必看:20个Nginx Web服务...
-
Meta
Google Search
-
Recent Posts
- 在安装php的make时候,出现错误"chmod: cannot access `ext/phar/phar.phar': No such file or directory"的解决办法
- 编译php出错:error while loading shared libraries: libmysqlclient.so.18: cannot open shared object f
- [教程]Centos下安装lnmp教程(最新版2012-02-05)
- centos升级内核教程
- Linux中各种文件系统基本特性ext2,ext3,ext4
- lsof命令详解
- 在FreeBSD系统中用pkill命令踢出SSH在线登录用户
- VSFTP中"Fixing 500 OOPS: vsftpd: refusing to run with writable root inside chroot ()"的解决办法!
- FreeBSD中重新分区提示"ERROR: Unable to write data to disk ad0! To edit the lables on a running system set sysctl kern.geom.debugflags=16 and try again."的解决办法
- FreeBSD启动出现"My unqualified host name unkown...Sleeping for retry"的解决办法
Blogroll
UED