关于简单的倒计时的问题
我写了一个倒计时程序如下
<!--
var nedd,neds,nesd,val
nedd=60
neds=30
nesd=0
val=2
function tick(val) {
var hours, minutes, seconds;
var intHours, intMinutes, intSeconds;
var today;
nedd=nedd+1
if (nedd == 61){
nedd=1
neds=neds+1
if (neds == 61){
neds=1
nesd=nesd+1
}
}
today = new Date();
intHours = val -nesd;
intMinutes =60 -neds;
intSeconds = 60 - nedd;
if (intSeconds < 10) {
seconds = "0"+intSeconds+" ";
} else {
seconds = intSeconds+" ";
}
if (intMinutes < 10) {
minutes = "0"+intMinutes+":";
} else {
minutes = intMinutes+":";
}
if (intHours < 10) {
hours = "0"+intHours+":";
} else {
hours = intHours+":";
}
timeString = hours+minutes+seconds;
document.all.Clock.innerHTML = timeString;
window.setTimeout("tick(val);", 1000);
}
//-->
自感觉程序写的比较笨,而且出现了一个NaN值,另外怎样从
querystring中毒去程序中的val值?