JSFiddle - React, Tailwind, and code Playground
HTML
<table id="mytable">
<tr>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td><input type="checkbox" /></td>
</tr>
<tr>
<td><input type="checkbox" /></td>
</tr>
</table>
<button id="save">Click</button>
JavaScript
$('#save').click(function () {
alert($('#mytable').find('input[type="checkbox"]:checked').length + ' checked');
});