Button Object
The name property sets or returns the value of the name attribute of a button.
The name attribute specifies the name of a button, and is used to reference form data after it has been submitted, or to reference the element in a JavaScript.
![]()
The name property is supported in all major browsers.
Return the value of the name attribute of a button:
Button Object
Your message has been sent to W3Schools.