Je cherche de laide en javascript svpl
pihkawi
Messages postés
15
Statut
Membre
-
avion-f16 Messages postés 19182 Date d'inscription Statut Contributeur Dernière intervention -
avion-f16 Messages postés 19182 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
dans une partie de mon site je cherche a présenter les hôtels en images , je cherche a créer ce script ( voila un exemple de script que je cherche : https://www.splendia.com/fr/marrakech-hotels.html ) mais le problème je n'arrive pas a mettre ce scripte dynamique .
merci d'avance pour votre aide
dans une partie de mon site je cherche a présenter les hôtels en images , je cherche a créer ce script ( voila un exemple de script que je cherche : https://www.splendia.com/fr/marrakech-hotels.html ) mais le problème je n'arrive pas a mettre ce scripte dynamique .
merci d'avance pour votre aide
1 réponse
-
Javascript :
function changerImage(url) { document.getElementById("imagebig").src = url; return false; }CSS :.imagetiny { width:120px; }HTML :<img src="image1.png" alt="" id="imagebig" /> <br/> <img src="image1.png" alt="" class="imagetiny" onclick="changerImage(this.src);" /> <img src="image2.png" alt="" class="imagetiny" onclick="changerImage(this.src);" /> <img src="image3.png" alt="" class="imagetiny" onclick="changerImage(this.src);" />