jquery提交form表单时禁止重复提交的方法

时间:2014-02-13    点击:94   

复制代码 代码如下:

$(document).ready(function() {
  $('form').submit(function() {
    if(typeof jQuery.data(this, "disabledOnSubmit") == 'undefined') {
      jQuery.data(this, "disabledOnSubmit", { submited: true });
      $('input[type=submit], input[type=button]', this).each(function() {
        $(this).attr("disabled", "disabled");
      });
      return true;
    }
    else
    {
      return false;
    }
  });
});

Js与下拉列表处理问题解决
js加载读取内容及显示与隐藏div示例
input禁止键盘及中文输入,但可以点击
JS实现将人民币金额转换为大写的示例代码
jquery清空表单数据示例分享
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved