编辑下面的代码:【加编码】
<html> <head> <script> function displayResult() { var firstRow=document.getElementById("myTable").rows[0]; firstRow.deleteCell(0); } </script> </head> <body> <table id="myTable" border="1"> <tr> <td>First cell</td> <td>Second cell</td> <td>Third cell</td> </tr> </table> <br> <button type="button" onclick="displayResult()">Delete first cell</button> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂