STEFANYPUBS
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.


bonnes vacances
 
AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
Le Deal du moment :
Fnac : 2 Funko Pop achetées : le 3ème ...
Voir le deal

 

 Catégorie de cette source :DATE & HEURE, Heure, Graphiqu

Aller en bas 
AuteurMessage
[P]aulineetoile
fondatrice admin
fondatrice admin
[P]aulineetoile


Nombre de messages : 461
Age : 37
Date d'inscription : 01/03/2007

Catégorie de cette source :DATE & HEURE, Heure, Graphiqu Empty
MessageSujet: Catégorie de cette source :DATE & HEURE, Heure, Graphiqu   Catégorie de cette source :DATE & HEURE, Heure, Graphiqu Empty06.07.07 13:50

Catégorie de cette source :DATE & HEURE, Heure, Graphique, Dynamique, Images, Rafraichissement


ce code affiche des images toutes les secondes dans le cas présent ces images sont pour une heure dynamique
Code:

<LI><DOCTYPE>

<LI><html>

<LI><head>

<LI>

<LI><script>

<LI><!--

<LI>

<LI>[color=#0000ff]function[/color] getTmp(){ [color=#008000]//rècupere l'heure courante toutes les secondes[/color]

<LI>

<LI>[color=#0000ff]var[/color] temps = [color=#0000ff]new[/color] [color=#0000ff]Date[/color]();

<LI>

<LI>[color=#0000ff]var[/color] heures = temps.getHours();

<LI>[color=#0000ff]var[/color] minutes = temps.getMinutes();

<LI>[color=#0000ff]var[/color] secondes = temps.getSeconds();

<LI>

<LI>  [color=#0000ff]document[/color].Heure.src = getImg(heures);

<LI>  [color=#0000ff]document[/color].DP1.src = getImg(60);

<LI>  [color=#0000ff]document[/color].Minute.src = getImg(minutes);

<LI>  [color=#0000ff]document[/color].DP2.src = getImg(60);

<LI>  [color=#0000ff]document[/color].Seconde.src = getImg(secondes);

<LI> 

<LI>  [color=#0000ff]setTimeout[/color]("[color=#8b0000]getTmp()[/color]",1000);

<LI>

<LI>}

<LI>

<LI>[color=#0000ff]function[/color] getImg(img) { [color=#008000]//dans laquelle getTmp() vas chercher les images[/color]

<LI>

<LI>  [color=#0000ff]var[/color] mem;

<LI> 

<LI>  [color=#0000ff]switch[/color](img) {

<LI> 

<LI>      [color=#0000ff]case[/color] 0 : mem = "[color=#8b0000]heure/00.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 1 : mem = "[color=#8b0000]heure/01.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 2 : mem = "[color=#8b0000]heure/02.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 3 : mem = "[color=#8b0000]heure/03.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 4 : mem = "[color=#8b0000]heure/04.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 5 : mem = "[color=#8b0000]heure/05.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 6 : mem = "[color=#8b0000]heure/06.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 7 : mem = "[color=#8b0000]heure/07.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 8 : mem = "[color=#8b0000]heure/08.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 9 : mem = "[color=#8b0000]heure/09.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 10 : mem = "[color=#8b0000]heure/10.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 11 : mem = "[color=#8b0000]heure/11.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 12 : mem = "[color=#8b0000]heure/12.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 13 : mem = "[color=#8b0000]heure/13.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 14 : mem = "[color=#8b0000]heure/14.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 15 : mem = "[color=#8b0000]heure/15.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 16 : mem = "[color=#8b0000]heure/16.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 17 : mem = "[color=#8b0000]heure/17.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 18 : mem = "[color=#8b0000]heure/18.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 19 : mem = "[color=#8b0000]heure/19.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 20 : mem = "[color=#8b0000]heure/20.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 21 : mem = "[color=#8b0000]heure/21.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 22 : mem = "[color=#8b0000]heure/22.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 23 : mem = "[color=#8b0000]heure/23.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 24 : mem = "[color=#8b0000]heure/24.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 25 : mem = "[color=#8b0000]heure/25.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 26 : mem = "[color=#8b0000]heure/26.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 27 : mem = "[color=#8b0000]heure/27.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 28 : mem = "[color=#8b0000]heure/28.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 29 : mem = "[color=#8b0000]heure/29.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 30 : mem = "[color=#8b0000]heure/30.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 31 : mem = "[color=#8b0000]heure/31.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 32 : mem = "[color=#8b0000]heure/32.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 33 : mem = "[color=#8b0000]heure/33.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 34 : mem = "[color=#8b0000]heure/34.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 35 : mem = "[color=#8b0000]heure/35.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 36 : mem = "[color=#8b0000]heure/36.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 37 : mem = "[color=#8b0000]heure/37.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 38 : mem = "[color=#8b0000]heure/38.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 39 : mem = "[color=#8b0000]heure/39.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 40 : mem = "[color=#8b0000]heure/40.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 41 : mem = "[color=#8b0000]heure/41.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 42 : mem = "[color=#8b0000]heure/42.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 43 : mem = "[color=#8b0000]heure/43.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 44 : mem = "[color=#8b0000]heure/44.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 45 : mem = "[color=#8b0000]heure/45.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 46 : mem = "[color=#8b0000]heure/46.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 47 : mem = "[color=#8b0000]heure/47.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 48 : mem = "[color=#8b0000]heure/48.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 49 : mem = "[color=#8b0000]heure/49.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 50 : mem = "[color=#8b0000]heure/50.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 51 : mem = "[color=#8b0000]heure/51.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 52 : mem = "[color=#8b0000]heure/52.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 53 : mem = "[color=#8b0000]heure/53.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 54 : mem = "[color=#8b0000]heure/54.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 55 : mem = "[color=#8b0000]heure/55.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 56 : mem = "[color=#8b0000]heure/56.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 57 : mem = "[color=#8b0000]heure/57.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 58 : mem = "[color=#8b0000]heure/58.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 59 : mem = "[color=#8b0000]heure/59.png[/color]"; [color=#0000ff]break[/color];

<LI>      [color=#0000ff]case[/color] 60 : mem = "[color=#8b0000]heure/DP.png[/color]"; [color=#0000ff]break[/color];

<LI>  }

<LI>

<LI>[color=#0000ff]return[/color] mem;

<LI>

<LI>}

<LI>

<LI>[color=#008000]//-->[/color]

<LI></script>

<LI>

<LI></head>

<LI><body>

<LI>

<LI><table><tr><td>

<LI><img id="[color=#8b0000]Heure[/color]"><img id="[color=#8b0000]DP1[/color]"><img id="[color=#8b0000]Minute[/color]"><img id="[color=#8b0000]DP2[/color]"><img id="[color=#8b0000]Seconde[/color]">

<LI></table></tr></td>

<LI>

<LI></body>

</html>
Revenir en haut Aller en bas
http://ucberkeley.bestdiscussion.net/index.htm
 
Catégorie de cette source :DATE & HEURE, Heure, Graphiqu
Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
STEFANYPUBS :: Internet pratique :: la boite à outils-
Sauter vers:  
Ne ratez plus aucun deal !
Abonnez-vous pour recevoir par notification une sélection des meilleurs deals chaque jour.
IgnorerAutoriser