Button Object
The value property sets or returns the value of the value attribute of a button.
The value attribute specifies the underlying value that is associated with a button.
Important: If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between the <button> and </button> tags, while other browsers will submit the content of the value attribute. Use the input element instead, to create buttons in an HTML form.
![]()
The value property is supported in all major browsers.
Return the text displayed on the button:
Button Object
Your message has been sent to W3Schools.