HTML Elements
Creates a submit button. | HTML 2, 3.2, 4, 4.01, 5 |
HTML Syntax
<input
accesskey = key
class = classname
datafld = fieldname
dataformatas = html | text
datasrc = #id
dir = ltr | rtl
disabled
id = value
name = name
size = n
style = css properties
tabindex = n
title = text
type = submit
value = value
event = script
>
The INPUT type=submit element renders a button that, when clicked, submits the form.
The default button label is application-specific, but authors can use the value attribute to provide a noneditable label to be displayed on the button. If a submit button is clicked and the button has a specified name attribute, that button contributes a name/value pair to the submitted data.
A form may contain more than one submit button.
INPUT Members
The following sample shows a simple form that allows the user to enter a first name, last name, email address, and gender. When the submit button is activated, the form will be sent to the program specified by the action attribute.
Below is the HTML fragment for the sample above.
<form>
<table bgcolor="khaki" cellspacing=10>
<col align="right">
<tr>
<td>First name:</td>
<td><input type="text" name="firstname"></td></tr>
<tr>
<td>Last name:</td>
<td><input type="text" name="lastname"></td></tr>
<tr>
<td>email:</td>
<td><input type="text" name="email"></td></tr>
<tr>
<td colspan=2 align="center">
<input type="radio" name="sex" value="Male"> Male
<input type="radio" name="sex" value="Female"> Female
</td></tr>
<tr>
<td colspan=2 align="center">
<input type="Submit" value="Send">
<input type="Reset" value="Reset"></td></tr>
</table>
</form>
BUTTON INPUT submit Method Processing form Data