透过禁用按钮避免jQuery.ajax重复请求

通过禁用按钮避免jQuery.ajax重复请求function disabledButton() {$(input[@typesubmit]).each(funct

通过禁用按钮避免jQuery.ajax重复请求

function disabledButton() {$("input[@type='submit']").each(function () {    $(this).bind("click", function () {   $(this).attr("disabled", true);   $(this).parents().filter("form").trigger("submit");});});}var initFun = window.onload;if (initFun == null) {window.onload = disabledButton;} else {window.onload = function () {initFun();disabledButton();};}