Object name Property

❮ Object Object

Example

Get the name of an <object> element:

var x = document.getElementById("myObject").name;
Try it Yourself »

More "Try it Yourself" examples below.


Description

The name property sets or returns the value of the name attribute of an <object> element.

The name attribute specifies the name of an object.


Browser Support

Property
name Yes Yes Yes Yes Yes

Syntax

Return the name property:

objObject.name

Set the name property:

objObject.name = name

Property Values

Value Description
name Specifies the name of the <object> element

Technical Details

Return Value: A String, representing the name of the <object> element

More Examples

Example

Change the name of an <object> element:

document.getElementById("myObject").name = "newObjName";
Try it Yourself »

Related Pages

HTML reference: HTML <object> name attribute


❮ Object Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.