Validation and Submission
Form Action Buttons
Submit and Reset Intentionally
An order form declares where data is posted, which field name is sent, and which buttons submit or reset the form.
Program
Form submission depends on attributes as much as visible controls. Action and method choose the request, names choose keys, and button types choose behavior.
form_action_buttons.html
<form action="/orders" method="post">
<input name="item" value="Notebook">
<button type="submit">Save</button>
<button type="reset">Reset</button>
</form>
method
The method attribute chooses the HTTP method for form submission.
button type
Button type tells the browser whether a button submits, resets, or only runs script.