Edit This Code:
<!DOCTYPE html>
<html>
<body>

<h3>A demonstration of how to access an OBJECT element</h3>

<object id="myObject" width="400" height="400" data="helloworld.swf">
</object>

<p>Click the button to get the URL of the embedded flash file.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myObject").data;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy