Object name attribute
Definition and Usage
name
Sets or returns the name of the <object> element name attribute value.
The name attribute specifies the name of the object.
See also:
HTML Reference Manual:HTML <object> name Attribute
HTML Reference Manual:HTML <object> Tag
Example
Example 1
Get the name of the <object> element:
var x = document.getElementById("myObject").name;
Example 2
Change the name of the <object> element:
document.getElementById("myObject").name = "newObjName";
Syntax
Return the name attribute:
objObject.name
Set name attribute:
objObject.name = name
Attribute Value
Value | Description |
---|---|
name | Specifies the name of the <object> element. |
Technical Details
Return Value: | A string value representing the name of the <object> element. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |