Bonjour,
Ma fonction javascript suivante ne fonctionne pas et je ne comprends pas pourquoi ?!?!
Merci de votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 function envoyerpoursession(id) { var imgName = "HeartIcon"; if (document.getElementById("imga"+id).src == imgName+"0.png") { document.getElementById("imga"+id).src = imgName+"1.png"; } else { document.getElementById("imga"+id).src = imgName+"0.png"; }
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <img src="HeartIcon0.png" height="10" id="imga12" onclick="envoyerpoursession(12); return false;" /> <img src="HeartIcon0.png" height="10" id="imga737" onclick="envoyerpoursession(737); return false;" />
Partager