60 of 133 menu

Reset form fields button

The input tag with the type attribute set to reset creates a reset button for the HTML form fields. After clicking such a button, the form fields will return to the appearance they had when the user entered the page (before any changes were made by the user).

Example

Let's change the form fields and then click the reset button to return them to their original state:

<form> <input type="checkbox" checked> <input type="text"> <input type="reset" value="reset button"> <input type="submit" value="send button"> </form>

:

See also

  • button button,
    also used to reset the form
  • button submit,
    used to submit the form
byenru