Team:AUC TURKEY
From 2013hs.igem.org
(Difference between revisions)
Line 16: | Line 16: | ||
</style> | </style> | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
- | var jamboree;var countdown;countdownTimer=function(){var | + | var jamboree; |
+ | var countdown; | ||
+ | countdownTimer=function() | ||
+ | { | ||
+ | var _loc6 = new Date(); | ||
+ | var _loc2 = jamboree - _loc6; | ||
+ | if (_loc2 < 0){ | ||
+ | countdown.innerHTML="000:00:00:00"; | ||
+ | }else{ | ||
+ | var _loc1 = Math.floor(_loc2 / 86400000); | ||
+ | var _loc4 = Math.floor(_loc2 / 3600000) % 24; | ||
+ | var _loc5 = Math.floor(_loc2 / 60000) % 60; | ||
+ | var _loc3 = Math.floor(_loc2 / 1000) % 60; | ||
+ | if (_loc1 < 10){ | ||
+ | days = "00" + _loc1; | ||
+ | }else if (_loc1 < 100){ | ||
+ | days = "0" + _loc1; | ||
+ | }else{ | ||
+ | days = _loc1; | ||
+ | } | ||
+ | if (_loc4 < 10){ | ||
+ | hours = "0" + _loc4; | ||
+ | }else{ | ||
+ | hours = _loc4; | ||
+ | } | ||
+ | if (_loc5 < 10){ | ||
+ | minutes = "0" + _loc5; | ||
+ | }else{ | ||
+ | minutes = _loc5; | ||
+ | } | ||
+ | if (_loc3 < 10){ | ||
+ | seconds = "0" + _loc3; | ||
+ | }else{ | ||
+ | seconds = _loc3; | ||
+ | } | ||
+ | countdown.innerHTML=days+":"+hours+":"+minutes+":"+seconds; | ||
+ | } | ||
+ | setTimeout(countdownTimer,500); | ||
+ | } | ||
+ | window.onload=function(){ | ||
+ | jamboree=new Date(2013,5,28); | ||
+ | countdown=document.getElementById("countdown"); | ||
+ | countdownTimer(); | ||
+ | } | ||
</script> | </script> | ||
</head> | </head> |
Revision as of 09:49, 13 June 2013