Object height Property - Change the height and width of an <object> element to 300px: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Object

Description

Object height Property - Change the height and width of an <object> element to 300px:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<object id="myObject" width="250" height="200" data="helloworld.swf" style="border:1px solid black"></object>

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

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

<script>
function myFunction() {/*from   w ww .ja  v a 2  s . c  o m*/
    document.getElementById("myObject").height = "500";
    document.getElementById("myObject").width = "500";
}
</script>

</body>
</html>

Related Tutorials