我尝试使用jQuery实现对表的过滤。这是我测试的代码:
$("#txtGroup").keyup(function() {
var value = this.value;
$("table").find("tr").each(function(index) {
if (index === 0) return;
var id = $(this).find("td").find("label").text();
$(this).toggle(id.indexOf(value) !== -1);
});
});

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="txtGroup" />
<table id="tblGroups">
<tr><td><label><input type="checkbox" id="AccountingFinance" name="Accounting & Finance">Accounting & Finance</label></td></tr>
<tr><td><label><input type="checkbox" id="AdvancedAnalytics" name="Advanced Analytics">Advanced Analytics</label></td></tr>
<tr><td><label><input type="checkbox" id="Alliances" name="Alliances">Alliances</label></td></tr>
<tr><td><label><input type="checkbox" id="BusinessAdvisoryServices" name="Business Advisory Services">Business Advisory Services</label></td></tr>
<tr><td><label><input type="checkbox" id="BusinessApplicationsandIntegration" name="Business Applications and Integration">Business Applications and Integration</label></td></tr>
<tr><td><label><input type="checkbox" id="BusinessOperations" name="Business Operations">Business Operations</label></td></tr>
</table>
&#13;
我正在寻求:
正如你所看到的,结果很受欢迎。
顺便说一句,我在Stack Overflow上从这个问题得到了这个基本功能: