Execute javascript code straight before page submit
<p>There are a few similar questions to this but none quite the same.</p>

<p>I want to know if there is an event that can be used to execute some JS before a page is submitting (i.e. POSTed).</p>
