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

HTML DOM Submit name property

Submit name property

Submit Object Reference The Submit object


Definition and Usage

The name property can be set or returned to indicate the value of the name property of the submit button.

The name attribute is used to send data to the server after form submission, or to reference form data in JavaScript.

Note: After form submission, only the name attribute of form elements is used to pass data values.

Syntax

Set the name attribute:

submitObject.name="

name

"

Return the name attribute:

submitObject.name


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name property.


Example

Example

The following example displays the name of the confirm button:

Runoob Tutorial(runoob.com)

Email:

Try it »


Submit Object Reference The Submit object