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

HTML DOM Button name Property

Button name Property

Button Object Reference Button Object


Definition and Usage

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

The name attribute specifies the name of the button, often used to reference the data in the server-side dynamic language after form submission, or to reference the element in JavaScript. /p>

Syntax

buttonObject.name=

name


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name property.


Example

Example

Return the value of the name attribute of the button:

Runoob Tutorial(runoob.com)

The name of the button:

Try it »


Button Object Reference Button Object