prevent multiple form submissions javascript

Solutions on MaxInterview for prevent multiple form submissions javascript by the best coders in the world

showing results for - "prevent multiple form submissions javascript"
Julian
02 Jan 2021
1var form = document.getElementById('formID');
2var submitButton = document.getElementById('submitID');
3
4form.addEventListener('submit', function() {
5
6   // Disable the submit button
7   submitButton.setAttribute('disabled', 'disabled');
8
9   // Change the "Submit" text
10   submitButton.value = 'Please wait...';
11			
12}, false);