码迷,mamicode.com
首页 > Web开发 > 详细

jQuery给CheckBox添加事件

时间:2014-09-04 09:33:27      阅读:377      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   div   cti   sp   log   on   

<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");
                }
            });
});

jQuery给CheckBox添加事件

标签:style   blog   color   io   div   cti   sp   log   on   

原文地址:http://www.cnblogs.com/liuswi/p/3955281.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!