title: How to remove existing and add onsubmit in form using jquery
body: <p>Given this HTML to create a form:</p>
  
  <pre><code>&lt;form name="search" id="myForm" onsubmit="return existingfunc()" method="post"&gt;
      &lt;input type="submit" value="Search" title="Search"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I can change the form's name via jQuery using <code>$('#myForm').attr('name','newname')</code>.</p>
  
  <p>Is it possible to change the form's <code>onsubmit</code> function?</p>