Javascript examples for DOM HTML Element:Object
The object represents an HTML <object> element.
You can access an <object> element by using getElementById():
<!DOCTYPE html> <html> <body> <object id="myObject" width="400" height="400" data="helloworld.swf"> </object>//from w ww .j av a2 s . co m <button onclick="myFunction()">get the URL of the embedded flash file</button> <p id="demo"></p> <script> function myFunction() { var x = document.getElementById("myObject").data; document.getElementById("demo").innerHTML = x; } </script> </body> </html>