Team:KAIST-Korea/Test Count
From 2011.igem.org
(Difference between revisions)
Line 22: | Line 22: | ||
document.timeForm.input1.value = daysRound + ":" + hoursRound + ":" + minutesRound + ":" + secondsRound; | document.timeForm.input1.value = daysRound + ":" + hoursRound + ":" + minutesRound + ":" + secondsRound; | ||
newtime = window.setTimeout("getTime();", 1000); | newtime = window.setTimeout("getTime();", 1000); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | document.timeForm. | + | |
+ | now2 = new Date(); | ||
+ | dday2 = new Date("Nov 7 2011 00:00:00"); | ||
+ | days2 = (dday2 - now2) / 1000 / 60 / 60 / 24; | ||
+ | daysRound2 = Math.floor(days2); | ||
+ | hours2 = (dday2 - now2) / 1000 / 60 / 60 - (24 * daysRound2); | ||
+ | hoursRound2 = Math.floor(hours2); | ||
+ | minutes2 = (dday2 - now2) / 1000 /60 - (24 * 60 * daysRound2) - (60 * hoursRound2); | ||
+ | minutesRound2 = Math.floor(minutes2); | ||
+ | seconds2 = (dday2 - now2) / 1000 - (24 * 60 * 60 * daysRound2) - (60 * 60 * hoursRound2) - (60 * minutesRound2); | ||
+ | secondsRound2 = Math.round(seconds2); | ||
+ | |||
+ | document.timeForm.input2.value = daysRound + ":" + hoursRound + ":" + minutesRound + ":" + secondsRound; | ||
newtime = window.setTimeout("getTime();", 1000); | newtime = window.setTimeout("getTime();", 1000); | ||
+ | |||
} | } | ||
+ | |||
Revision as of 10:27, 8 July 2011