HTML <object> nameAttribute

HTML object 标签参考手册HTML <object> tag

Example

<object> element with a name attribute:

<object data="helloworld.swf" width="400" height="400"
name="obj1"></object>

Try it yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies the name of the <object> element.

The name attribute is used to reference the <object> element in JavaScript (the alternative is to reference it by using the id attribute).


Differences between HTML 4.01 and HTML5

None.


Syntax

<object name="name">

Attribute Values

Value Description
name The name of the <object> element.


HTML object 标签参考手册HTML <object> tag Other Extensions