Javascript examples for DOM HTML Element:Object
Object width Property - Get the width of an <object> element:
<!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() {/*from w w w .j a va 2 s . co m*/ var x = document.getElementById("myObject").width; document.getElementById("demo").innerHTML = x; } </script> </body> </html>