Created
November 6, 2013 08:14
-
-
Save lambda2/7332601 to your computer and use it in GitHub Desktop.
Affiche l'heure courant ou truc dans le container avec l'id donnée en paramètre (ici, heure)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getHeure(container, utc) | |
| { | |
| d = new Date() | |
| if (utc) | |
| { | |
| t = date.getUTCHours()+":"date.getUTCMinutes()+":"+date.getUTCSeconds(); | |
| } | |
| else | |
| { | |
| t = date.getHours()+":"date.getMinutes()+":"+date.getSeconds(); | |
| } | |
| document.getElementById(container).innerHTML=t; | |
| } | |
| setInterval("getHeure('heure',false)", 1000); |
Author
lambda2
commented
Nov 6, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment