Give all the rows you want to hide a class name that you can use for hiding. Use javascript to add/remove this class from the different rows.
<table>
<tr><th>Test Table</th><tr>
<tr class="toHide"><td>123456789</td><tr>
<tr class="toHide"><td>123456789</td><tr>
<tr class="toHide"><td>123456789</td><tr>
</table>
CSS:
.toHide
{
display: none;
}