Bonjour a tous,
Je debute en javascript et j'ai quelques problemes. J'utilise un script inséré entre les balises head et body et associé a un fichier .js a la base de l'arborescence de mon site afin de faire tourner un compte a rebours.
Je me suis renseigné sur les boucles mais je ne parviens pas a adapter le bon script a mon compte a rebours. Quelqu'un connaìtrait il le code a ajouter a mon script afin que mon compte a rebours reparte directement de la valeur configuree dès qu'il arrive a zero ?
Merci pour vos reponses
Voici mon script :
Entre les balises head :
Entre les balises body :Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 <script type="text/javascript" src="/scripts/countdown.js" defer="defer"></script> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ function menuderoulant(selection){ window.location=selection.options[selection.selectedIndex].value; } //- -> </script> <script language="JavaScript"> var mess = " My special offer is ending soon ! Order now and get 13 free bonuses worth $570 now ! "; var i = 0; function defilmess() { window.status = mess.substring(i, mess.length) + mess.substring(0, i); i++; if (i > mess.length) i = 0; window.setTimeout("defilmess()",200); } defilmess(); </script>
ps : j'ai oublié de préciser que tel qu'il est, mon compte a rebours part dans le positif une fois le zero passé, de la manière suivante : 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4...Code:
1
2
3
4
5
6
7
8
9
10
11 <h1 style="color: rgb(255, 0, 0); text-align: center;">MY SPECIAL OFFER WILL EXPIRE SOON !</h1> <div style="text-align: center;"><big><big style="font-weight: bold;"><span style="color: rgb(255, 0, 0);">Counting down to the end of the special offer : </span><span style="color: rgb(255, 0, 0);" id="countdown1">2006-5-24 22:00:00 GMT+02:00 </span></big><span style="color: rgb(255, 0, 0);"><big style="font-weight: bold;">!</big><br> <br>
Si quelqu un avait une piste a me donner pour mon problème, ca me rendrait pas mal service, je me tiens à votre disposition pour plus de détails quant à mon problème.
Merci.