1
<table id="myTable" border="1">
2
<tr>
3
<th>月份</th>
4
<th>储蓄</th>
5
</tr>
6
<tr>
7
<td>一月</td>
8
<td>$100</td>
9
</tr>
10
<tr>
11
<td>二月</td>
12
<td>$150</td>
13
</tr>
14
</table>
15
<br>
16
<button type="button" onclick="myFunction()">折叠边框</button>
17
<script>
18
function myFunction() {
19
document.getElementById("myTable").style.borderCollapse = "collapse";
20
}
21
</script>