//隐藏非选中的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