Javascript examples for DOM HTML Element:Embed
The Embed object represents an HTML <embed> element.
You can access an <embed> element by using getElementById():
<!DOCTYPE html> <html> <body> <embed id="myEmbed" src="helloworld.swf"> <button onclick="myFunction()">get the URL of the embedded flash file</button> <p id="demo"></p> <script> function myFunction() {/*w w w .j a v a 2 s . c om*/ var x = document.getElementById("myEmbed").src; document.getElementById("demo").innerHTML = x; } </script> </body> </html>