法一: //指定时间隐藏层 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, 层
-
-
iqzlnhyyia: senttcmph, ...
-
designer shoes: Whatever variety girls you happen to be, yo...
-
Graig Mamer: I love your website! I'll make sure to book...
-
my.cnf最详细解释 | 尘土: [...] 原文:my.cnf最详细解释 [...]...
-
help: 我在做apache支持泛解析的时候有...
-
MongoDB 索引数据类型优化,节省60%内存 | haohtml's blog: [...] 原文链接:How to save 200% RAM b...
-
Meta
Google Search
-
Recent Posts
Blogroll
UED