Properties and Method of Form



Write a javascript code to implement onsubmit event.

<html>
  <head>
    <title>Function Demo</title>
      <script>

      function pass() 
      {
          alert("Submit");
      }

      </script>
    </head>
  <body>

<form onsubmit="pass()">
Name : <input type="text" value="text">
<input type="submit" value="Submit">

    </form>        
  </body>
</html>

Output: