复选框操作

时间:2014-06-17 13:49:09   收藏:0   阅读:421
<script>
    $(function () {
        //查找id=tab的表格,下面所有的tr,下面的所有td,第一个td下面复习框的点击事件。
        $("#tab tr>td:nth-child(1)").find("input[type=‘checkbox‘]").bind("click"function () {
            if ($(this).attr("checked") == true) {
                $(this).parent().nextAll().find("input[type=‘checkbox‘]").attr("checked"true);
            }
            else {
                $(this).parent().nextAll().find("input[type=‘checkbox‘]").attr("checked"false);
            }
        })
    })
</script>

复选框操作,布布扣,bubuko.com

原文:http://www.cnblogs.com/mingjian/p/3791593.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!