Get the URL of the object:
var x = document.getElementById("myObject").data;
The data property sets or returns the value of the data attribute of an <object> element.
The data attribute specifies the URL of the resource to be used by the object.
Property | |||||
---|---|---|---|---|---|
data | Yes | Yes | Yes | Yes | Yes |
Return the data property:
objObject.data
Set the data property:
objObject.data = URL
Value | Description |
---|---|
URL | Specifies the URL of the resource to be used by the object.
Possible values:
|
Return Value: | A String, representing the URL of the object. Returns the entire URL, including the protocol (like http://) |
---|
HTML reference: HTML <object> data attribute