<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript"> tbtitre=new Array("titre 1","titre 2","titre 3"); tbtxt=new Array("Lorem Ipsum is simply dummy text of the printing and typesetting industry.","when an unknown printer took a galley of type and scrambled it to make a type specimen book.","Lbut also the leap into electronic typesetting, remaining essentially unchanged."); tbimage=new Array("d1g.jpg","d2g.jpg","d3g.jpg"); function change(lui){ for (var i=0; i<lui.parentNode.getElementsByTagName('img').length ; i++){ if(lui.parentNode.getElementsByTagName('img')[i]==lui) { document.getElementById('txt').firstChild.nodeValue=tbtxt[i] document.getElementById('titre').firstChild.nodeValue=tbtitre[i] document.getElementById('coucou').src=tbimage[i] } } } </script> </head> titre 1 Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</html>