javascript stop the form from reloading
<script>
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>
0
0
Use <button type="button"> to override default submission behavior
Use event.preventDefault() in the onSubmit event to prevent form submission
Thank you!
0
0
Are there any code examples left?
New code examples in category Javascript