赞
踩
您可以在启动ajax调用之前禁用该复选框.您可以使用该prop()
方法来执行此操作.将disabled
属性值设置为true
$(".chkOverride").click(function (e) { var _this=$(this); _this.prop('disabled', true); var userId = $("#UserId").val(); var isChecked = $(this).is(":checked") $.ajax({ url: "/Worker/Worker?Id=" + Id + "&isChecked=" + isChecked + "&UserId=" + UserId, type: "post", success: function (result) { alert("Success!"); //No point in enabling as you are going to reload the page _this.prop('disabled', false); location.reload(); }, error: function () { alert("Error :("); _this.prop('disabled', false); } }); });
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。