English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

Atributo name do HTML object

O atributo name especifica o nome do elemento <object>, usado para referenciar o elemento <object> no JavaScript (outra maneira é usar o atributo id).

 HTML <object> tag

Exemplo online

Elemento <object> com atributo name:

<!DOCTYPE html>
<html>
<head>
<title>HTML:<object> name attribute - Basic Tutorial Website(oldtoolbag.com)</title>/title>
</head>
<body>
<object data="helloworld.swf" width="500" height="200" name="obj1></object>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

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 refer to the <object> element in JavaScript (another method is to use its id attribute to refer to it).

HTML 4.01 With HTML5Differences

None.

Syntax

<object name="name">

Attribute value

ValueDescription
nameThe name of the <object> element.
 HTML <object> tag