手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >jquery提交form表单时禁止重复提交的方法
jquery提交form表单时禁止重复提交的方法
摘要:复制代码代码如下:$(document).ready(function(){$('form').submit(function(){if(t...

复制代码 代码如下:

$(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;

}

});

});

【jquery提交form表单时禁止重复提交的方法】相关文章:

javascript实时显示当天日期的方法

Jquery动态添加输入框的方法

jquery预加载图片的方法

js比较日期大小的方法

jquery简单实现外部链接用新窗口打开的方法

jQuery实现html表格动态添加新行的方法

JQuery自动触发事件的方法

js光标定位文本框回车表单提交问题的解决方法

jQuery实现仿腾讯微博滑出效果报告每日天气的方法

jQuery获得字体颜色16位码的方法

精品推荐
分类导航