Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reset form input react

cancelCourse = () => { 
  document.getElementById("create-course-form").reset();
}

render() {
  return (
    <form id="create-course-form">
      <input />
      <input />
      ...
      <input />
    </form>
  );
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #reset #form #input #react
ADD COMMENT
Topic
Name
8+9 =