📌  相关文章
📜  防止多个表单提交 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:51.038000             🧑  作者: Mango

代码示例1
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);