Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js stop form submit on enter

<button type="submit" onclick="submitButtonClick(event)">Submit</button>
<script>
function submitButtonClick(event) {
		event.preventDefault();
		//other stuff you want to do instead...
} 
</script>
 
PREVIOUS NEXT
Tagged: #js #stop #form #submit #enter
ADD COMMENT
Topic
Name
6+7 =