I know my question might seem stupid but I am stuck with this bit of code and I struggle with Javascript.
I would like to be able to display inside my page some images from the text of some links.
It might appear twisted but this is exactly what I want to do :-)
This is what I have managed to sort out so far if that can give you an idea :
<a href="#">http://www.online-image-editor.com/styles/2013/images/example_image.png</a>
<a href="#">http://images.math.cnrs.fr/IMG/png/section8-image.png</a>
<a href="#">http://www.online-image-editor.com/styles/2013/images/example_image.png</a>
var liens = document.getElementsByTagName('a'),
valeurs = [];
for (i = 0; i < liens.length; i += 1) {
if (liens[i].text) {
valeurs.push(liens[i].text);
document.body.innerHTML = "<img src='" + valeurs[i] + "'>";
}
}
Thank you!