bonjour,
en fait j'utilise ce bou de code pour faire 3 zooms, ça marche sous IE de ce coté pas de probleme, mais ça ne marche pas sous firefox, quelqu'un aurait une méthode pour palier a ce probleme?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 <html> <head> <title> Pwet </title> <script language="JavaScript"> var num=0; var largeur; var hauteur; function changer(img_id,pourcentage) { if (num == 0) { document.getElementById(img_id).width = largeur*pourcentage/100 ; document.getElementById(img_id).height = hauteur*pourcentage/100 ; } } function reduc_image(img_id) { largeur = document.getElementById(img_id).width; hauteur = document.getElementById(img_id).height; document.getElementById(img_id).width = largeur*0.2; document.getElementById(img_id).height = hauteur*0.2; } </script> </head> <body> <div align="center"> <h2>TesT</h2> <a href="#"> <img src="C:\Documents and Settings\Admin\Bureau\lov.jpg" border="0" id="baba" onload="reduc_image('baba')"></a><br /> <input type="button" value="Zoom1" onClick="changer('baba',40)" /> <input type="button" value="Zoom2" onClick="changer('baba',75)" /> <input type="button" value="Zoom3" onClick="changer('baba',100)" /> </div> </body> </html>
Partager