Answers for "Prevent Double Submit with JavaScript"

2

Prevent Double Submit with 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 Double Submit with JavaScript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language