<html> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>test</title></head>
<body>
<h1><font color=blue> 示范网页 </font> </h1>
<p></br>
<script>setTimeout("alert('对不起,久等了');", 3000);setTimeout("alert('对不起');",3000);
function clearWord()
{document.title = '';
}
</script><form>
<input type="button" value="在状态列显示文字" onClick="document.title='Hello' ,setTimeout('clearWord()', 3000) " />
</form>
</body>
</html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script>
x = 0
function countSecond( )
{ x = x+1document.fm.displayBox.value=xsetTimeout("countSecond()", 1000)
}
</script> </head>
<body bgcolor=lightcyan text=red> <p> </br><form name=fm>
<input type="text" name="displayBox"value="0" size=4 >
</form><script>
countSecond()
</script>
</body>
</html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title></head><body onload="countSecond();"><script>var x = 0;function countSecond(){ if ( x < 20 ) { x = x + 1;document.getElementById("displaySec").value = xsetTimeout("countSecond()", 1000)}}</script><input type="text" id="displaySec" value="0" /></body>
</html>
运行结果