title: How to set `onSubmit` dynamically with JavaScript
body: <p>Right now I am in a bit of a dilemma because I cannot edit the <code>onSubmit</code> of my form, so I will have to set it dynamically. My problem is, I have no idea how to do this without overwriting the value that is already in the <code>onSubmit</code><br/>For example, lets say I have this code:<br/></p>
  
  <pre><code>&lt;form name="bob" onSubmit="something-i-cannot-change"&gt;
  
  &lt;/form&gt; 
  </code></pre>
  
  <p>How would I set another function to happen <code>onSubmit</code> along with the other function that is already in there? I looked this up and had no luck... Thanks, I really appreciate any help!!!<br/><br/>Note: If this question is a duplicate of anything, then please let me know!</p>