onload里用window.setTimeout(函数名,时间值)函数怎么写就不用说了吧,比如先定义一个<div id=div1 style="display:none"..............
function f1()
{ div1.style.display=""
.................
function f1()
{ div1.style.display=""
.................
<html><head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function show() { document.aa.style.display=""; }
//-->
</script>
<title>新增網頁1</title>
</head><body onload="javascript:window.setTimeout(show,1);">
dsfdsafdsaf<br>
dddsdsdsd
<br>
<div id="aa" style="display:none"><font color="red">5555555555</font></div>
</body></html>
<html><head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
<!--
function show() { aa.style.display="";
//alert("aaaa"); }
//-->
</script>
<title>新增網頁1</title>
</head><body onload="window.setTimeout(show,5000);">
dsfdsafdsaf<br>
dddsdsdsd
<br>
<div id="aa" style="display:none"><font color="red">5555555555</font></div>
</body></html>
改成aa.style.display="";
时间设置长一些,
1秒要设置成1000
<script language="VBScript" type="text/VBScript">
Dim pubLoopCode
pubLoopCode=setTimeout("ViewKiteGirl()",10000)
Sub ViewKiteGirl()
Set tNewElement=document.createElement("IMG")
tNewElement.src="动画骷髅头.gif"
document.all.body.insterAdjacentElement "beforeEnd",tNewElement
End Sub
</script>