Easy Tutorial
❮ Prop Select Form Jsref Setutcmonth ❯

Input Button name Attribute


Definition and Usage

The name attribute sets or returns the value of the name attribute of a button element.

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

Note: Only form elements with a name attribute will have their values passed when the form is submitted.

Syntax

Set the name attribute:

Return the name attribute:


Browser Support

All major browsers support the name attribute.


Example

Display the name attribute value of a button:


❮ Prop Select Form Jsref Setutcmonth ❯