Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Parameter name Property

Parameter name Property

Parameter Object Reference Parameter Object

Example

Obtain the The name of the element:

var x = document.getElementById("myParam").name

x

The output is:

autoplay

Try it »


Definition and Usage

The name property sets or returns the value of the name attribute of the parameter.

The name attribute specifies The name of the element.

This attribute is usually used together with the value attribute to specify the parameters of the plugin defined by the tag.

The value of the name attribute can be any name supported by the specified object.

Note: All major browsers support the name property. However, the file formats defined in it are not supported by all browsers.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute


Syntax

Return the name attribute:

parameterObject

.name

Set the name attribute:

parameterObject

.name=

name

Attribute values

Value Description
name Specify the name of the parameter

Technical Details

Return Value: A string representing the name of the parameter

Related pages

HTML Reference Manual: HTML name attribute


Parameter Object Reference Parameter Object