title: Prevent form from submitting with certain buttons HTML/JS
body: <p>I am working on a school website, where you can make an assignment. I have a submit button, which is the one that should redirect. I also have some other buttons within this form which are not submit buttons. The problem is, When i click those buttons that i don't want to redirect, it still redirects. What i thought i should do is:</p>
  <pre><code>form.addEventListener(&quot;submit&quot;, (e) =&gt;{
       e.preventDefault();
  }
  </code></pre>
  <p>But have realised that that would stop me from submitting at all.</p>
  <p>I am not sure what to do.
  I have tried event.preventDefault for each button, but that doesn seem to work either.</p>
  <p>How do i fix this please help I need answers pronto!</p>