form on submit example
Example: how to use form on submit in html
<form onsubmit="myFunction()">
Enter name: <input type="text">
<input type="submit">
</form>
<form onsubmit="myFunction()">
Enter name: <input type="text">
<input type="submit">
</form>