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);
-
}
 
-
function getTime2()
 
-
{
 
-
      now = new Date();
 
-
      dday = new Date("Nov 7 2011 00:00:00");
 
-
      days = (dday - now) / 1000 / 60 / 60 / 24;
 
-
      daysRound = Math.floor(days);
 
-
      hours = (dday - now) / 1000 / 60 / 60 - (24 * daysRound);
 
-
      hoursRound = Math.floor(hours);
 
-
      minutes = (dday - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
 
-
      minutesRound = Math.floor(minutes);
 
-
      seconds = (dday - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
 
-
      secondsRound = Math.round(seconds);
 
-
       document.timeForm.input1.value = daysRound  + ":" + hoursRound + ":" + minutesRound + ":" + secondsRound;
+
 
 +
      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

Menu
Menu Menu