Horje
How to create HTML Input Type Reset

<input type="reset"> defines a reset button that will reset all form values to their default values:


How is to look HTML Input Type Reset

index.html
Example: HTML
<input type="reset" value="Reset">

Full Code Example of Input Type Reset

The input type="reset" defines a reset button that resets all form values to their default values:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Reset Button</h2>

<p>The <strong>input type="reset"</strong> defines a reset button that resets all form values to their default values:</p>

<form action="/action_page.php">
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname" value="John"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname" value="Doe"><br><br>
  <input type="submit" value="Submit">
  <input type="reset" value="Reset">
</form> 

<p>If you change the input values and then click the "Reset" button, the form-data will be reset to the default values.</p>

</body>
</html>

Output should be:

Full Code Example of Input Type Reset





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference