[JavaScript]
Vaub
-
Vaub -
Vaub -
Bonjour, je voudrais un code pour avoir la Height/Width de l'image:
<script>
function gallery(url)
{
window.open(url, "Image", "width=, height=, location=no, menubar=no, resizable=no, status=no, directories=no");
}
</script>
<img src="image1.jpg" onclick="gallery('image1.jpg');">
<script>
function gallery(url)
{
window.open(url, "Image", "width=, height=, location=no, menubar=no, resizable=no, status=no, directories=no");
}
</script>
<img src="image1.jpg" onclick="gallery('image1.jpg');">
Configuration: Linux Mozilla 1.7.12
1 réponse
-
Salut!
<html> <head> <script> function getSize(url){ img = new Image(); img.src=url; return {"width": img.width, "height": img.height}; } </script> </head> <body> <img src="http://www.commentcamarche.net/communaute/thumbs/HackTrack" onclick="javascript:s = new Array();s=getSize(this.src);alert(s.width+'x'+s.height);" /> </body> </html>
;-)
HackTrack