onsubmit:
onSubmit is the HTML event called when a submit button is pressed on a HTML form. The event is also called the form.submit() function is called. It can be used to trigger JavaScript to validate the form, pre-process its data, or block the submission altogether.