Return the height of an <img> element:
alert(document.getElementById("myImg").style.height);
<!DOCTYPE html> <html> <body> <img id="myImg" src="image1.png" style="width:100px;height:132px;"> <br> <button type="button" onclick="myFunction()">Return height of image</button> <p id="demo"></p> <script> function myFunction() {/*www.ja v a 2 s . c om*/ document.getElementById("demo").innerHTML = document.getElementById("myImg").style.height; } </script> </body> </html>