欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery提交form表單時禁止重復(fù)提交的方法

 更新時間:2014年02月13日 09:41:24   作者:  
這篇文章主要介紹了jquery提交form表單時禁止重復(fù)提交的方法,需要的朋友可以參考下

復(fù)制代碼 代碼如下:

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

相關(guān)文章

最新評論