就是如何设置一个参数,让document.write的内容只显示2秒。谢谢。
document.write不行,通过dom节点进行,例子如下
<!DOCTYPE html>
<html>
<body>
<div id='showdiv'></div>
</body>
<script>
document.getElementById('showdiv').innerHTML='显示2秒';
setTimeout("document.getElementById('showdiv').innerHTML='';",2000);
</script>
</html>
http://jun1986.iteye.com/blog/1025965
看一下js定时器的用法
用alert用定时函数setTimeout("调用的函数名称",等待的毫秒数);
用定时器,,,,,,,,,
document不行,况且你也不能只显示一个东西吧。用js。
可以参考这个,js实现等待n秒后--按钮可用
http://www.cnblogs.com/anbylau2130/archive/2013/06/09/3128691.html
谢谢各位,楼上楼下一并谢过
http://www.jb51.net/article/40193.htm
document.write不行,通过dom节点进行,例子如下
<!DOCTYPE html>