Saturday, October 8, 2011

Reset a form using javascript

In JavaScript there are two ways to reset the a form :

  • By using Reset button of HTML
          <input type="reset" value="Reset" />
  • By using reset() method of JavaScript      
  document.getElementById('formname').reset();

No comments:

Post a Comment