AdminbCe que tu veux comme texte
Messages : 230 Réputation : 0 Date d'inscription : 12/06/2009 Umore : &
En savoir plus sur moi test: | Sujet: Afficher un div aléatoirement Ven 22 Jan - 20:00 | |
| Et bien alors voici un exemple de script avec 5 div ( j'ai mis des bêtes mots dans les 4 derniers, mais on peut y mettre ce qu'on souhaîte ) : - Code:
-
<div id="affiche01" style="background-image: url(http://i85.servimg.com/u/f85/13/05/16/60/jackpo10.jpg); height: 66px; width: 240px; padding-left:340px; padding-top: 65px;"><script type="text/javascript" src="http://www.abcompteur.com/cpt/?code=5/25/9299/2/3&ID=496133"></script></div> <div id="affiche02" style="display: none;">Gorille</div> <div id="affiche03" style="display: none;">Serpent</div> <div id="affiche04" style="display: none;">Fromage</div> <div id="affiche05" style="display: none;">Papillon</div> <script type="text/javascript"> var res= 1+Math.floor(Math.random()*5); document.getElementById('affiche01').style.display='none'; document.getElementById('affiche0'+res).style.display='block'; </script> Cordialement. |
|