x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>蜜蜂教程(mifengjc.com)</title>
6
<script>
7
function displayResult() {
8
document.getElementById("myTable").deleteRow(0);
9
}
10
</script>
11
</head>
12
<body>
13
14
<table id="myTable" border="1">
15
<tr>
16
<td>cell 1</td>
17
<td>cell 2</td>
18
</tr>
19
<tr>
20
<td>cell 3</td>
21
<td>cell 4</td>
22
</tr>
23
</table>
24
<br>
25
<button type="button" onclick="displayResult()">删除表格第一行</button>
26
27
</body>
28
</html>