jquery关于checkbox选中和不选中的问题

来源:互联网 发布:淘宝男士小脚裤 编辑:程序博客网 时间:2024/05/21 10:11

近期由于项目需要,用到了列表checkbox,在点击被考核人的一行时,check不选中,然后解决方法是

   //点击被考核人列表    $("table.be_assess-employee-container").on("click", "tr.content", function () {        if ($(this).hasClass("on")) {            return;        } else {            $("table.be_assess-employee-container tr.content").removeClass("on");            $(this).addClass("on");            $("table.be_assess-employee-container tr.content td input[type=checkbox]").prop("checked", false);              $(this).find("td:eq(0) input[type=checkbox]").prop("checked", true);            getAllEmployeeToAppraisal();        }    });

阅读全文
1 0
原创粉丝点击