Get image id: javascript

Solved
tipi75 Posted messages 723 Status Membre -  
tipi75 Posted messages 723 Status Membre -
Hello,

I would like to retrieve the id of one of the images.

Html:

<div id = "conteneur"> <img src = "image/toto" id = "image1" /> <img src = "image/tata" id = "image2" /> <img src = "image/tutu" id = "image3" /> </div>

<a href = "redirection()">Click here</a>

But I would like to retrieve the id of one of the images using JavaScript (redirection function). I can't find the method?

Thank you in advance

Configuration: Windows XP / Internet Explorer 8.0

5 réponses

avion-f16 Posted messages 19182 Registration date   Status Contributeur Last intervention   4 511
 
By chance?
--
Your computer doesn't do what you want... but what you tell it to do.
2