法一: //指定时间隐藏层 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, 层
-
-
[教程]FreeBSD下使用ports安装Nginx + PHP5.2.6 + Php-fpm | haohtml's blog: [...] 另一篇介绍FastCGI方式运行php...
-
[教程]FreeBSD下nginx+fast-cgi+mysql+zend的实现 | haohtml's blog: [...] 如果您的系统里提示没有这...
-
CentOS5上yum安装Apache+php+Mysql | haohtml's blog: [...] 6. 防火墙配置(重要)参考...
-
portsnap fetch extract时,出现Is the system clock correct? | haohtml's blog: [...] 有关ntpdate命令详解见:http://b...
-
cacti for windows 安装 | haohtml's blog: [...] 如果要监控其它windows服务器...
-
用linux上的cacti去监控windows服务器 | haohtml's blog: [...] 27 Jul, 2010 in 服务器类 by admin...
-
Other
Meta
站内搜索
-
Recent Posts
Blogroll
UED