Answers for "how to prevent the form from getting automatically submitted javascript"

1

how to prevent the form from getting automatically submitted javascript

//add event.preventDefault() example,

function clickHandler(event){
	alert("Hey you clicked the submit button");
	event.preventDefault();
}

//this will prevent the page from getting automatically refreshed after 
//the submit button is hit.
Posted by: Guest on May-24-2021

Code answers related to "how to prevent the form from getting automatically submitted javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language