HTML » form » onsubmit


The onsubmit attribute is an event that allows the execution of JavaScript code when the user submits the form.For example, you could call a JavaScript function that performs client-side form verification to ensure that the form is filled out correctly (see code example).