Bonjour,
La fonction ratioImage (ci-dessous) n'est pas compatible avec IE9 :
A appeler comme ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <script language="javascript"> function ratioImage(urlImage,largeurImg){ photo=new Image(); photo.src=urlImage; var photoWidth=photo.width; var photoHeight=photo.height; var ratio=(Math.round((largeurImg/photoWidth)*100))/100; var newPhotoWidth=photoWidth*ratio; var newPhotoHeight=photoHeight*ratio; document.write("<img class=\"image_presentation\" src=\"" + urlImage + "\" width=\"" + newPhotoWidth + "\" height=\"" + newPhotoHeight+ "\" />"); }; </script>
Auriez-vous une solution de remplacement pour cette fonction ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <script language="javascript"> ratioImage("http://www.clickonmylinks.fr/wp-content/images/singe1.jpg",100) </script>
D'avance merci.
Partager