<asp:Button ID="btnTrue" runat="server" Text="保 存" OnClientClick="if(checkResult()){this.value=‘正在保存‘;this.disabled=true;}else {return false ;}" UseSubmitBehavior="false" class="btnblue1" onclick="btnTrue_Click" /> function checkResult() { if ($("#txtTravelUserName").val() == "") { alert("出差人姓名不能为空!"); $("#txtTravelUserName").focus(); return false; } else if ($.trim($("#txtTravelPost").val()) == "") { alert("职务不能为空!"); $("#txtTravelPost").focus(); return false; } return true; }
时间: 2024-11-05 16:02:59