CheckBox加JS验证后不触发服务端事件
<script type="text/javascript"> function GoIndex(zno) { var mess = ""; if (zno == 1) { mess = $("#txtSummary1").val(); } else if (zno == 2) { mess = $("#txtSummary2").val(); } else if (zno == 3) { mess = $("#txtSummary3").val(); } else if (zno == 4) { mess = $("#txtSummary4").val(); } else if (zno == 5) { mess = $("#txtSummary5").val(); } else { } if (confirm("确定标记:" +mess+ " 吗?")) { return true; } else { return false; } } </script>
<asp:CheckBox ID="chbZY2" onclick="return GoIndex(2);" runat="server" Visible="true" AutoPostBack="True" oncheckedchanged="chbZY2_CheckedChanged" />