Answers for "prevent form from submiting while on the js function"

1

js stop form submit

<button type="submit" onclick="submitButtonClick(event)">Submit</button>
<script>
function submitButtonClick(event) {
		event.preventDefault();
		//other stuff you want to do instead...
} 
</script>
Posted by: Guest on July-27-2020
8

javascript prevent form submit

<form name="foo" onsubmit="return false">
Posted by: Guest on March-04-2020

Code answers related to "prevent form from submiting while on the js function"

Code answers related to "Javascript"

Browse Popular Code Answers by Language