<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html;charset=utf8">
<head>
<title>倒計時</title>
</head>
<body>
請等待<span id="dd">10</span>秒
<script type="text/javascript">
function run(){
var s = document.getElementById("dd");
if(s.innerHTML == 0){
window.location.href='#';
return false;
}
s.innerHTML = s.innerHTML * 1 - 1;
}
setInterval("run();", 1000);
</script>javascript
</body>
</html>html