Javascript examples for CSS Style Property:height
Return the height of an <img> element:
<!DOCTYPE html> <html> <body> <img id="myImg" src="http://java2s.com/resources/c.png" style="width:100px;height:132px;"> <br> <button type="button" onclick="myFunction()">Return height of image</button> <script> function myFunction() {// ww w . j a v a 2 s . com console.log(document.getElementById("myImg").style.height); } </script> </body> </html>