jquery 返回false后怎样不执行后台的事件
function wxTrueName() {
var trueName = $("#<%=txtUserTrueName.ClientID%>").val();
if (trueName.length == 0) {
$("#lblUserTrueName").css({ color: "red" });
$("#lblUserTrueName").text("请输入用户姓名!");
return false;
} else {
$("#lblUserTrueName").text("");
}
}[code]
[code=csharp]<td class="td_class">姓名:
</td>
<td height="25">
<asp:TextBox ID="txtUserTrueName" runat="server" style="width: 200px;"></asp:TextBox>
<label id="lblUserTrueName" style="font-size: 14px; font-weight: normal; color: red;"></label>
</td>
<asp:Button ID="btnSave" CssClass="adminsubmit_short" OnClientClick="return wxTrueName()" OnClick="btnSave_ServerClick" runat="server" Text="保存" />