title: onSubmit event on a button element will it work?
body: <p>The following is the code.</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script type="text/javascript"&gt;
              function call() {
                  alert("hai");
              }
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form name="login" method="post" action=""&gt;
              &lt;input type="submit" name="Submit" value="login" onSubmit="call()"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Is it possible to create an event <code>onSubmit</code> inside the input element type <code>button</code>.</p>
  
  <p>This is for an assignment. I was told by my tutor that it is possible. Any help would be highly appreciated.</p>
  
  <p>Thank you.</p>