<! DocType html> <html> <kopf> <meta http-äquiv = "content-type" content = "text/html; charset = utf-8"/> <title> 防止重复表单提交 </title> <style> #refresh {display: None; Breite: 200px; Höhe: 20px; Hintergrundfarbe: #ff0; } </style> <script> var inprocess = false; window.onload = function () {document.forms ["picker"]. OnSubmit = validesSubmit; document.GetElementById ("aktualisieren"). Onclick = StartOver; } Funktion validiert () {// 防止重复的表单提交 if (inprocess) return; inprocess = true; console.log (Inprozess); document.getElementById ("subledbutton"). Disabled = true; document.getElementById ("refresh"). style.display = "block"; document.getElementById ("message"). innerhtml = "<p> 正在 Verarbeitung , 稍等 </p>"; false zurückgeben; } functions -startOver () {inprocess = false; document.getElementById ("SubmitButton"). Disabled = False; document.getElementById ("message"). innerhtml = ""; document.GetElementById ("refresh"). style.display = "keine"; } < /script> < /head> <body> <form id = "picker" method = "post" action = ""> gruppe1: <Eingabe type = "radio" name = "Group1" value = "one" /> Group2: <Eingabe -Typ = "Radio" name = "Group1" value = "zwei" /> gruppe3: <braps type = "radio". ID = "Intext"/> Eingabe 2: <Eingabe type = "text" id = "intext2"/> Eingabe 3: <Eingabe type = "text" id = "intext3"/> <Eingabe type = "subly" id = "sublbutton" value = "senden Form"/> </form> </divdiv id ".