隐藏非选中的checkBox

//隐藏非选中的checkBox
    function onlyCheckBox(){
        $("#dtlTable tr:gt(0)").each(function(i) {
            var chkListProduct = $("input[name='chkListProduct']", this);
            if (chkListProduct.is(':checked')) {
            }else {
                chkListProduct.parents("tr").hide();
            }
        })
    }
chkListProduct 是复选框的ID
posted @ 2018-06-25 19:42  Cxw丶cm  阅读(340)  评论(0编辑  收藏  举报