blogspot.com-GA4

星期三, 5月 21, 2008

script倒數計時

來源:藍色小鋪

<script>
var digit = 100;
function cd() {
if(digit <= 0) return;
document.getElementById("count_down").innerHTML = digit;
digit --;
}
window.onload = function() {
setInterval(cd, 1000);
}
</script>
<div id="count_down"></div>

沒有留言: