<! Doctype html> <html> <head> <meta http-equiv = "konten-tipe" content = "text/html; charset = utf-8"/> <itement> 防止重复表单提交 </iteme> <tyle> #refresh {display: none; Lebar: 200px; Tinggi: 20px; latar belakang-warna: #ff0; } </tyle> <script> var inprocess = false; window.onload = function () {document.forms ["picker"]. OnsubMit = validateSubMit; document.getElementById ("Refresh"). OnClick = Startover; } function validateSubMit () {// 防止重复的表单提交 if (inprocess) return; inprocess = true; console.log (inprocess); document.getElementById ("SubmitButton"). Disabled = true; document.getElementById ("Refresh"). style.display = "block"; document.geteLementById ("pesan"). innerHtml = "<p> 正在 pemrosesan , 稍等 </p>"; mengembalikan false; } function startover () {inprocess = false; document.getElementById ("SubmitButton"). Disabled = false; document.geteLementById ("pesan"). innerHtml = ""; document.geteLementById ("Refresh"). style.display = "none"; } </script> </head> <body> <bentuk id = "picker" method = "post" action = ""> group1: <input type = "Radio" name = "group1" value = "One" /> Group2: <input type = "Radio" name = "group1" value = "dua" /> grup3: <input type = "Radio" name = "group1" value = "dua" /> grup3: <input type = "Radio" name = "input1" Nilai "" Tiga " /BRIP3: <input =" Radio "name =" NAME "NAME" " type = "text" id = "intext" /> input 2: <input type = "text" id = "intext2" /> input 3: <input type = "text" id = "intext3" /> <input type = "kirim" id = "kirimbutton" value = "kirim formulir" /< /form < /form> < /form> <form> <pif> < /form> < /form> < /form> <form> <form> <form> <form> <pif> < /form> < /form> <form> <div id = "refress"> <p> <pif> < /form < /form> <form> <div id = "refresh"> <pif> p> <pif> < /form> < /form> <Div ID = "REFRESH"> <p> id = "pesan"> </div> </body> </html>