<html>
<head>
</head>
<body>
<script type="text/javascript">
function hide(){
document.getElementById("colGroup1").childNodes[1].style.display = "none";
}
function show(){
document.getElementById("colGroup1").childNodes[1].style.display = "block";
}
</script>
<table border="1" width="100%" id="table1">
<colgroup id="colGroup1">
<col/>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
</tbody>
</table>
<p>
<input type="button" value="1" name="B3" οnclick="hide();">
<input type="button" value="2" name="B4" οnclick="show();">
</p>
<body>
</html>
,在firefox下如何通过colgroup中的col元素来实现隐藏列,还没有搞定
<head>
</head>
<body>
<script type="text/javascript">
function hide(){
document.getElementById("colGroup1").childNodes[1].style.display = "none";
}
function show(){
document.getElementById("colGroup1").childNodes[1].style.display = "block";
}
</script>
<table border="1" width="100%" id="table1">
<colgroup id="colGroup1">
<col/>
<col/>
<col/>
</colgroup>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
</tr>
</tbody>
</table>
<p>
<input type="button" value="1" name="B3" οnclick="hide();">
<input type="button" value="2" name="B4" οnclick="show();">
</p>
<body>
</html>
,在firefox下如何通过colgroup中的col元素来实现隐藏列,还没有搞定