<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script>
function show_hide(_class) {
var tr = document.querySelectorAll(_class);
for (var i = 0; i < tr.length; ++i) tr[i].setAttribute('style', tr[i].getAttribute('style') ? "" : "display:none");
}
</script>
</head>
<body>
<table>
<tr>
<td onclick="show_hide('.as1')">Показать1</td>
<td onclick="show_hide('.as2')">Показать2</td>
<td onclick="show_hide('.as3')">Показать3</td>
</tr>
<tr class="as1" style="display:none"><td colspan="3">Показано1</td></tr>
<tr class="as1" style="display:none"><td colspan="3">Показано1</td></tr>
<tr class="as1" style="display:none"><td colspan="3">Показано1</td></tr>
<tr class="as2" style="display:none"><td colspan="3">Показано2</td></tr>
<tr class="as2" style="display:none"><td colspan="3">Показано2</td></tr>
<tr class="as2" style="display:none"><td colspan="3">Показано2</td></tr>
<tr class="as3" style="display:none"><td colspan="3">Показано3</td></tr>
<tr class="as3" style="display:none"><td colspan="3">Показано3</td></tr>
<tr class="as3" style="display:none"><td colspan="3">Показано3</td></tr>
</table>
</body>
</html>