dimanche 1 mars 2015

JavaScript calculates image dimensions different from Firefox (?)


I have a resized image on a web page. The height returned by javascript line: alert(document.getElementById("myimg").height); or alert(document.getElementById("myimg").clientHeight); is different from the (correct) one returned by Firefox (right click -> view image info). The same for width. How can I force JavaScript to calculate image dimensions as Firefox?





Aucun commentaire:

Enregistrer un commentaire