Get image id: javascript

Solved
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 answers