Object height Property - Get the height of an <object> element: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Object

Description

Object height Property - Get the height of an <object> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<object id="myObject" width="250" height="200" data="helloworld.swf"></object>

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

<p id="demo"></p>

<script>
function myFunction() {/* w w  w.java  2  s .  com*/
    var x = document.getElementById("myObject").height;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials