jQuery给CheckBox添加事件
<asp:CheckBox ID="ckbTable" runat="server" Checked="false" /> <table id="table" style="display:none" border="0" cellspacing="0" cellpadding="0" > <tr> <td>123</td> </tr> </table>
$(function(){ $("#ckbTable").click(function () { if (this.checked) { $("#table").css("display", "block"); } else { $("#table").css("display", "none"); } }); });