Team:OUC-China
From 2012.igem.org
(Difference between revisions)
Line 19: | Line 19: | ||
margin-top:330px; | margin-top:330px; | ||
} | } | ||
+ | .center{margin-top:60px;font-family:arial;font-size:1em;font-weight:bold;color:#00FF00;} | ||
+ | .right{text-align:right;font-family:arial;font-size:1em;font-weight:bold;} | ||
</style> | </style> | ||
- | <script | + | <script> |
- | var | + | var endtimes=new Array(); |
- | + | endtimes[0]="4/6/2012 9:03:00"; | |
- | + | var nowtimes; | |
- | + | function givetime(){ | |
- | + | nowtimes=new Date("4/6/2010 9:03:00"); | |
- | + | window.setTimeout("DownCount()",1000) | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
} | } | ||
- | + | function DownCount(){ | |
- | </script>< | + | nowtimes=Number(nowtimes)+1000; |
+ | for(var i=0;i<=0;i++) | ||
+ | { | ||
+ | var theDay=new Date(endtimes[i]); | ||
+ | theDay=theDay++; | ||
+ | if(theDay<=nowtimes) | ||
+ | { | ||
+ | document.getElementById("times"+i).innerHTML = "00小时,00分钟,00秒"; | ||
+ | } | ||
+ | else{ | ||
+ | timechange(theDay,i); | ||
+ | |||
+ | } | ||
+ | } | ||
+ | window.setTimeout("DownCount()",1000) | ||
+ | } | ||
+ | function timechange(theDay,i){ | ||
+ | var theDays=new Date(theDay); | ||
+ | var seconds = (theDays - nowtimes)/1000; | ||
+ | var minutes = Math.floor(seconds/60); | ||
+ | var hours = Math.floor(minutes/60); | ||
+ | var days = Math.floor(hours/24); | ||
+ | var CDay= days; | ||
+ | var CHour= hours % 24; | ||
+ | var CMinute= minutes % 60; | ||
+ | var CSecond= seconds % 60; | ||
+ | var CHour=CHour+CDay*24; | ||
+ | if(CMinute<10) | ||
+ | { | ||
+ | CMinute="0"+CMinute; | ||
+ | } | ||
+ | if(CHour<10) | ||
+ | { | ||
+ | CHour="0"+CHour; | ||
+ | } | ||
+ | if(CSecond<10) | ||
+ | { | ||
+ | CSecond="0"+CSecond; | ||
+ | } | ||
+ | document.getElementById("times"+i).innerHTML = CHour + "hours," + CMinute + "minutes," + CSecond + "seconds"; | ||
+ | } | ||
+ | </script> | ||
+ | <body> | ||
+ | <img style="margin-left:400px;margin-top:150px;" src="https://static.igem.org/mediawiki/2012/0/03/OUC-China.ready.png"/> | ||
+ | <body onload="givetime()"> | ||
+ | <p class="center">We only have:<div style="color:#00FF00;margin-top:70px;margin-left:460px;font-size:2em;" id="times0"></div></p> | ||
<hr> | <hr> | ||
<p class="right">Thanks to zhihu</p> | <p class="right">Thanks to zhihu</p> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 15:20, 29 February 2012
We only have:
Thanks to zhihu