web开发中禁止因为网速慢导致重复提交数据

var checkSubmitFlg = false;
  function check() {
                if (!checkSubmitFlg) {
                    checkSubmitFlg = true;
                    return true;
                }
                else {
                    alert('禁止重复提交!');
                    return false;
            }
        }

posted @ 2014-12-03 13:28  觉缘168  阅读(468)  评论(0)    收藏  举报