- $(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;
- }
- });
- });
- //该片段来自于http://www.codesnippet.cn/detail/101220137887.html
来源: http://www.codesnippet.cn/detail/101220137887.html