Answers for "prevent multiple form submissions javascript"

2

prevent multiple form submissions javascript

var form = document.getElementById('formID');
var submitButton = document.getElementById('submitID');

form.addEventListener('submit', function() {

   // Disable the submit button
   submitButton.setAttribute('disabled', 'disabled');

   // Change the "Submit" text
   submitButton.value = 'Please wait...';
			
}, false);
Posted by: Guest on May-16-2020

Code answers related to "prevent multiple form submissions javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language