手机
当前位置:查字典教程网 >编程开发 >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取消ajax请求的方法

jQuery解析XML文件同时动态增加js文件的方法

jquery预加载图片的方法

js控制网页前进和后退的方法

JQuery中DOM实现事件移除的方法

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

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

精品推荐
分类导航