|
|
|
|
<Script>
|
Bon voilà j'ai remanipuler un peu le code de wilsonlevrai pour un peu le nettoyer et arranger ça, tu peux télécharger les sources (avec des images exemple) et lancer test.html pour voir ce que ça donne :
<!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test-this</title> <script language="javascript" type="text/javascript"> //maxi est le repertoire des images grands formats //mini est le repertoire des images petits formats function AfficheMaxi(a) { document.getElementById('ZonePrMaxi').innerHTML ="<img src='images/maxi/"+a+"' width=600 height=480 />"; } </script> <style> #img_menu img { border: 1px solid black; margin-bottom: 5px; margin-top: 5px; cursor: pointer; } </style> </head> <body> <table border="1"> <tr> <td id="img_menu" style="vertical-align: top;"> <img src="images/mini/photo1.png" width="100" height="80" onclick="javascript:AfficheMaxi('photo1.png');" /><br /> <img src="images/mini/photo2.png" width="100" height="80" onclick="javascript:AfficheMaxi('photo2.png');" /><br /> <img src="images/mini/photo3.png" width="100" height="80" onclick="javascript:AfficheMaxi('photo3.png');" /><br /> <img src="images/mini/photo4.png" width="100" height="80" onclick="javascript:AfficheMaxi('photo4.png');" /></td> <td id="ZonePrMaxi"></td> </tr> </table> </body> </html> |
Pour l'automatiser il va te falloir utiliser du PHP :)
|