html head script function showHide id if document getElementById id st

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<html>
<head>
<script>
function showHide(id) {
if(document.getElementById(id).style.display != '')
document.getElementById(id).style.display = '';
else
document.getElementById(id).style.display = 'none';}
</script>
</head>
<table onClick="showHide(tt)">
<tr><td>asdasdasd</td></tr></table>
<table style='display: none;' id=tt><tr><td>WORK</td></tr>
</table></html>