<html>
<body>
<img id="myImg" src="w3javascript.gif" style="width:100px;height:132px;">
<br>
<button type="button" onclick="myFunction()">Return height of image</button>
<script>
function myFunction() {
alert(document.getElementById("myImg").style.height);
}
</script>
</body>
</html>