Team:KAIST-Korea/Test Count

From 2011.igem.org

(Difference between revisions)
Line 23: Line 23:
       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;
 +
      newtime = window.setTimeout("getTime();", 1000);
 +
}
 +
 +
</script>
</script>
Line 31: Line 49:
<BODY onLoad="getTime()">
<BODY onLoad="getTime()">
-
 
<style>
<style>
Line 42: Line 59:
<p align=center>
<p align=center>
<form name=timeForm>
<form name=timeForm>
-
<input type=text name=input1 border-style="none" style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;  font:30px arial, helvetica,sans-serif; color:white; background-color:black;"></form>
+
<input type=text name=input1 border-style="none" style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;  font:30px arial, helvetica,sans-serif; color:white; background-color:black; position:absolute; left:300px; top:300px"></form>
 +
<input type=text name=input2 border-style="none" style="border-bottom: 0px solid; border-left: 0px solid;border-right: 0px solid;border-top: 0px solid;  font:30px arial, helvetica,sans-serif; color:white; background-color:black; position:absolute; left:500px; top:300px"></form>
</center>
</center>
</BODY>
</BODY>
</HTML>
</HTML>

Revision as of 10:26, 8 July 2011

Menu
Menu Menu