Embed width Property - Return the width of an embedded file: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Embed

Description

Embed width Property - Return the width of an embedded file:

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 ww. jav  a 2 s .c  o m
    var v = document.getElementById("myEmbed").width;
    console.log(v);
}
</script>

</body>
</html>

Related Tutorials