title: How can I listen to the form submit event in javascript?
body: <p>I wanna write my own form validation javascript library and I've been looking on google how to detect if a submit button is clicked but all I found is code where you have to use onClick on <code>onSubmit="function()"</code> in html.</p>
  
  <p>I would like to make this javascript so that I don't have to touch any html code like adding onSubmit or onClick javascript.</p>