<html>
<head>
<title>打开网页就倒计时</title>
<script language="javascript">
function jishi(i){
var time=document.getElementById("djs");
if ( i<0)
{
alert("时间到!");
clearInterval("si");
return;
}
else
{
time.innerText=i;
j=i-1;
}
var si=setTimeout("jishi(j)",1000);
}
</script>
</head>
<body onLoad="jishi('10');">
倒计时:<div id="djs"></div>
</body>
</html>