Rendre une colonne invisible en javascript
salut,
j'essaie en javascript de rendre une colonne d'un tableau invisible. avec une ligne pas de probleme, ca marche bien :
Code:
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
|
<html>
<head>
<script type="text/javascript">
function hideIt()
{
document.getElementById("col2").style.visibility="collapse";
}
</script>
</head>
<body>
<table border='1'>
<tr id='col2'>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>_1</td>
<td>_2</td>
<td>_3</td>
<td>_4</td>
</tr>
<tr>
<td>1_</td>
<td>2_</td>
<td>3_</td>
<td>4_</td>
</tr>
</table>
<form>
<input type="button" onclick="hideIt()" value="Hide">
</form>
</body>
</html> |
mais les colones je n'arrive pas a les cacher. si vous avez une idée, je suis preneur :D
merci