1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
<html>
<body>
<script type="text/javascript">
function dispSSRub(td /* la cellule cliquée */) {
//la ligne de la rubrique
tr = td.parentNode;
//on cherche le TR suivant, celui des sous-rubriques
while ((tr=tr.nextSibling).tagName != "TR") ;
var disp = tr.style.display;
tr.style.display = (disp=='' ? 'none' :'');
}
</script>
<table border="1">
<tr>
<td onclick="dispSSRub(this);">Sport</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>VOLLEY</td>
<td>TENNIS</td>
<td>FOOT</td>
</tr>
</table>
</td>
</tr>
<tr>
<td onclick="dispSSRub(this);">Lecture</td>
</tr>
<tr>
<td>
<table>
<tr>
<td>Policier</td>
<td>Sciences-Fiction</td>
<td>Poesie</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> |
Partager