From 2009.igem.org
(Difference between revisions)
|
|
Line 97: |
Line 97: |
| </html> | | </html> |
| | | |
- | <html>
| |
- | <head>
| |
- | <title>script date et heure</title>
| |
- | <!-- DEBUT DU SCRIPT --><script language="JavaScript">
| |
- | function HeureCheck()
| |
- | {
| |
- | krucial = new Date;
| |
- | heure = krucial.getHours();
| |
- | min = krucial.getMinutes();
| |
- | sec = krucial.getSeconds();
| |
- | mois = krucial.getMonth()+1;
| |
- | jour = krucial.getDate();
| |
- | annee = krucial.getFullYear();
| |
- | if (sec< 10)
| |
- | {
| |
- | sec0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | sec0 = "";
| |
- | }
| |
- | if (min< 10)
| |
- | {
| |
- | min0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | min0 = "";
| |
- | }
| |
- | if (heure< 10)
| |
- | {
| |
- | heure0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | heure0 = "";
| |
- | }
| |
- | if (mois< 10)
| |
- | {
| |
- | mois0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | mois0 = "";
| |
- | }
| |
- | if (jour< 10)
| |
- | {
| |
- | jour0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | jour0 = "";
| |
- | }
| |
- | if (annee< 10)
| |
- | {
| |
- | annee0 = "0";
| |
- | }
| |
- | else
| |
- | {
| |
- | annee0 = "";
| |
- | }
| |
- | DinaDate = "" + jour0 + jour + "/" + mois0 + mois + "/" + annee0 + annee;
| |
- | total = DinaDate
| |
- | DinaHeure = heure0 + heure + ":" + min0 + min + ":" + sec0 + sec;
| |
- | total = DinaHeure
| |
- | total = DinaDate + " - " + DinaHeure;
| |
- | document.time.timebox.value = total;
| |
- | tempo = setTimeout("HeureCheck()", 1000)
| |
- | }
| |
- | </script>
| |
- | </head>
| |
- | <body bgcolor="#FFFFFF" vlink="#9900FF" onload="HeureCheck()" onunload="clearTimeout(tempo)">
| |
- | <center><p>
| |
- | <table border=0 bgcolor="#33cc66" width="40%" height="20%">
| |
- | <tr>
| |
- | <td>
| |
- | <center>
| |
- | <font size="+1" face="arial">
| |
- | <form action="" method=post name=time>
| |
- | <center><input type=text name=timebox value="" size=20></center>
| |
- | </form> </font></p>
| |
- | </t>
| |
- | </tr>
| |
- | </table>
| |
- | </font></p></center>
| |
- | </body>
| |
- | </html>
| |
| </div> | | </div> |
| | | |
Revision as of 19:21, 20 September 2009