Object data attribute
Definition and usage
data
Set or return the data attribute of the <object> element HTML <object> data Attribute Value.
The data attribute specifies the URL of the resource to be used by the object.
See also:
HTML Reference Manual:HTML <object> data Attribute
HTML Reference Manual:HTML <object> Tag
Example
Get the URL of the object:
var x = document.getElementById("myObject").data;
Syntax
Return the data attribute:
objObject.data
Set the data attribute:
objObject.data = URL
Attribute value
Value | Description |
---|---|
URL |
Specifies the URL of the resource to be used by the object. Possible values:
|
Technical Details
Return Value: | A string value representing the object's URL. Returns the entire URL, including the protocol (such as http://). |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |