javascript: validate form before submit?

In the form tag there is a field onsubmit to specify your validation function.
Something like that:

<form name="myForm" onsubmit="return validateForm()" method="post">
    <!-- your inputs -->

</form>

Leave a Comment