<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>
<h1>演示如何访问 TR 元素</h1>
<table>
<tr id="myRow">
<td>First cell</td>
<td>Second cell</td>
<td>Third cell</td>
</tr>
</table>
<p>单击此按钮可从表格行中删除第一个单元格。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
var row = document.getElementById("myRow");
row.deleteCell(0);
}
</script>
</body>
</html>