title: how to stop e.preventDefault() in javascript after getting a successful form validation
body: <p>I want to stop my e.Preventdefault() after a  successful validation of form.  I want to send all the data of form  in mysql.... But just because of e.Preventdefault() i can't send the data to mysql. Form is stuck in the same page.</p>
  <pre><code>form.addEventListener('submit',(e)=&gt;{
  e.preventDefault();
  checkInputs();
  successMsg();
  </code></pre>
  <p>});</p>