Warning:
This wiki has been archived and is now read-only.
Elements/input/submit
From HTML Wiki
Contents
<input type="submit">
The submit state represents a button that, when activated, submits the form.
Point
- If the element has a value attribute, the button's label must be the value of that attribute; otherwise, it must be an implementation-defined string that means "Submit" or some such.
HTML Attributes
formaction
= valid URL potentially surrounded by spaces
Specify the form-submission action for the element.
formenctype
= application/x-www-form-urlencoded / multipart/form-data / text/plain
Specfy a MIME type with which a UA is meant to associate this element for form submission.
The missing value default for these attributes is the application/x-www-form-urlencoded state.- application/x-www-form-urlencoded
- multipart/form-data
- text/plain
formmethod
= get/ post
Specify the HTTP method with which a UA is meant to associate this element for form submission.
The missing value default for this attributes is the GET state.- get
Indicating the HTTP GET method. - post
Indicating the HTTP POST method.
- get
formnovalidate
= boolean
If present, they indicate that the form is not to be validated during submission.
formtarget
= valid browsing context names or keywords
Specfy a browsing context name or keyword that represents the target of the control.
name
= string
Gives the name of the input element.
value
= string
Gives the default value of the input element.
Example
Example A
[try it]
<p><label>First name: <input type="text" name="fistname"></label></p> <p><label>Last name: <input type="text" name="lastname"></label></p> <p><label>E-mail: <input type="email" name="e-mail"></label></p> <p><input type="submit" value="submit"></p>
HTML Reference
The HTML5 specification defines the Submit state in 4.10.7.1.19 SUBMIT BUTTON STATE.