请求各位帮我改一下这个倒计时代码
<body> <span id="id1">2009-10-01 00:00:00</span>
<script>
var dt = $("id1").innerHTML;
var strArr = dt.split(" ");
var strDay = strArr[0].split("-");
var strTime = strArr[1].split(":");
//document.write(strDay[0]+strDay[1]+strDay[2]+strTime[0]+strTime[1]+strTime[2]);
//这个函数是倒计时
//setInterval("djs()",1000);
setInterval(showTime, 1000);
function $(id) {
return document.getElementById(id);
}
function showTime()
{
minutes = 1000 * 60;
hours = minutes * 60;
days = hours * 24;
//var years = days * 365;
date1 = new Date();
date2 = new Date(Date.UTC(strDay[0], strDay[1]-1, strDay[2], strTime[0]-8, strTime[1], strTime[2]));
minudt = date2 - date1;
//var y = Math.floor(minudt/years);
d = Math.floor(minudt/days);
h = Math.floor((minudt - d * days)/hours);
m = Math.floor((minudt - d * days - h * hours)/minutes);
s = Math.floor((minudt - d * days - h * hours - m * minutes)/1000);
$('id1').innerHTML = d + "天" + h + "时" + m + "分" + s + "秒";
}
</script>
</body>
这个代码是我刚在这论坛找到的,这倒计时非常好,但是就是倒计时完了就开始负倒计时,
所以请各位高手帮我修改成倒计时完毕后显示“本活动已经结束”
先在谢谢了