可以防止重复提交的问题

 document.forms[0].onsubmit=function () {
                                   if (window.document.readyState != null &&
                                            window.document.readyState != 'complete')

                                    {
                                        alert("正在处理,请稍候!");
                                        return false;
                                    }
                                  else
                                  { 
                                          return true;
                                   }
                               }
原文地址:https://www.cnblogs.com/tangself/p/1621983.html