title: Why is onsubmit="" so slow?
body: <p>I was using this first:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form onsubmit="return validate()"&gt;
      ...
      &lt;input type="submit" id="submit-button"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function validate() {
      // many lines for a big validation with regex and so on...
      $('form').submit();
  }
  </code></pre>
  
  <p><strong>I noticed, that this was loading very long, so I changed it to:</strong></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form&gt;
      ...
      &lt;input type="submit" id="submit-button"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function validate() {
      // many lines for a big validation with regex and so on...
          $('form').submit();
      }
  
      $('#submit-button').on('click', function(e) {
          e.preventDefault();
          validate();
  });
  </code></pre>
  
  <p><strong>And the loading time was OK and about 100 times faster!</strong></p>
  
  <p>Can someone give me a - hopefully - short answer to this?</p>