Embed width Property - Change the height and width of an embedded file to 500 pixels: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Embed

Description

Embed width Property - Change the height and width of an embedded file to 500 pixels:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<embed id="myEmbed" src="helloworld.swf" width="200" height="200" style="border:1px solid">

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

<script>
function myFunction() {/*from w  w w . j  a  v  a2s  . co m*/
    document.getElementById("myEmbed").height = "500";
    document.getElementById("myEmbed").width = "500";
}
</script>

</body>
</html>

Related Tutorials