IFrame height Property - Return the height of an iframe: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:IFrame

Description

IFrame height Property - Return the height of an iframe:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<iframe id="myFrame" src="http://java2s.com" height="200" width="250"></iframe>

<button onclick="myFunction()">Test</button>

<script>
function myFunction() {/*from   w  w w.ja  v a 2s .c  om*/
    var v = document.getElementById("myFrame").height;
    console.log(v);

}
</script>

</body>
</html>

Related Tutorials