日期:2014-05-16 浏览次数:20389 次
<Script> function count() { setTimeout("alert('三秒到了')",3000) </Script> <INPUT TYPE="button" VALUE=" 计时开始" onClick="count()">
<Script> function show() { document.all['news'].style.display = ""; setTimeout("hide()",500); } function hide() { document.all['news'].style.display = "none"; setTimeout("show()",500); } </Script> <Body onload="show()"> 最新消息:<FONT ID="news" STYLE="display:none">十面埋伏...</FONT> </Body>
<Script> var sec = 0; timerID = setInterval("count()",1000); function count() { num.innerHTML = sec++; } </Script> 停留时间: <FONT ID="num" FACE="impact">0</FONT>秒钟 <INPUT TYPE="button" VALUE="停止" onClick="clearInterval(timerID)">
<Script> var str = "这是一个在线拍卖的网站,请尽情血拼吧!"; var seq = 0; function scroll() { msg = str.substring(0, seq+1); banner.innerHTML = msg; seq++; if (seq >= str.length) seq = 0; } </Script> <Body onLoad="setInterval('scroll()',500)"> <FONT ID="banner"></FONT> </Body>
<Script> img0 = new Image(); img0.src = "images/snow0.gif"; img1 = new Image(); img1.src = "images/snow1.gif"; document.write ("已经读取两个图文件,但此时不显示。"); </Script>
<Script> function img-preload(idx){ eval("img"+idx+" = new Image()"); eval("img"+idx+".src = 'images/snow"+idx+".gif'"); } img-preload(0); img-preload(1); document.write ("已经读取两个图文件,但此时不显示。"); </Script>