Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reset form in react

<!-- you just need a button type of reset -->
<form>
  <div>
   <label for="name">Name</label>
   <input type="text" id="name" placeholder="name" />
  </div>
  <div>
   <label for="password">Password</label>
   <input type="password" id="password" placeholder="password" />
  </div>
  <button type="reset">Reset</button> 
  <button>Submit</button>
</form>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reset #form #react
ADD COMMENT
Topic
Name
7+6 =