Cod-nes 0 Report post Posted June 24, 2009 How can I get the image's width and height in pixels using javascript? Quote Share this post Link to post Share on other sites
jesh 0 Report post Posted June 24, 2009 You can do it like this: <img src="http://w3schools.invisionzone.com/style_images/6_logo.png" id="myimage" /><script type="text/javascript">var w,h,i;i = document.getElementById("myimage");w = i.width;h = i.height;alert("Width=" + w + "\nHeight=" + h);</script> Quote Share this post Link to post Share on other sites