全选、反选、取消选择JS代码

function CheckAll() {
        $('#tablelist td input[type="checkbox"]:not(:disabled)').attr('checked', 'true');
    }

    function Inverse() {
        $('#tablelist td input[type="checkbox"]:not(:disabled)').each(function () {
            $(this).attr("checked", !this.checked);
        });
    }

    function UncheckAll() {
        $('#tablelist td input[type="checkbox"]:not(:disabled)').removeAttr('checked');
    }

posted @ 2012-03-09 10:16  Rouse Law  阅读(309)  评论(0编辑  收藏  举报