how to stop from submit when refresh code example
Example: html prevent submit from reloading page
<form onSubmit="return false; // Returning false stops the page from reloading">
<button type="submit"></button>
</form>
<form onSubmit="return false; // Returning false stops the page from reloading">
<button type="submit"></button>
</form>