<table>
<tbody id="rows_cells">
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
<td>5</td>
</tr>
</tbody>
</table>
<p onclick="display()">Скрыть</p>
function display(){
var tbody=document.getElementById("rows_cells");
tbody.style.display=="none" ? tbody.style.display="block" : tbody.style.display="none";
}