HTML <button> Tag with the 'name' Attribute
<form id="myForm" action="/resources/html-forms-action.cfm">
<label>Bank Balance: <input name="userBankBalance"></label>
</form>
<button name="userAction" form="myForm" value="Send">
Send Email
</button>
In the above example we add the name
attribute to a button control.
About the name
Attribute
The name
attribute allows you to specify the name of the form control. If you include this attribute, it must not be the empty string.
About the <button>
Element
The <button>
element creates a button control in an HTML document.
Any contents of the <button>
element appears on the button.
The <button>
element can be associated with a form or stand alone by itself (in such case it could have JavaScript attached via the onclick
attribute) to make the button actually do something.