Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • reset() method in javascript

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 418
    Comment on it

    Reset() method:

    It is used to clear all the values entered in a form. This method does not require any parameter and also does not return any value.




    <!DOCTYPE html>
    <h4>Fill your details</h4>
    <form id="loginForm">
      <p>User name: <input type="text" name="fname"></p>
      <p>Password: <input type="password" name="paswd"></p>
      <input type="button" onclick="resetFunc()" value="Reset form">
    function resetFunc() {

    In the above example when a user will click on reset form button , resetFunc() will get called and it will clear all the form values entered by the user

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: