Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Ren <[email protected]>
  • Loading branch information
fuchunhui and jasonren0403 authored Oct 8, 2024
1 parent 7964b87 commit b305dbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/zh-cn/web/api/htmltablerowelement/deletecell/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ button {
```js
// 获取相关接口元素
const bodySection = document.querySelectorAll("tbody")[0];
const row = bodySection.rows[0]; // 选择主体部分的第一行
const row = bodySection.rows[0]; // 选择表格体部分的第一行
const cells = row.cells; // 集合是动态的,因此总是最新的
const cellNumberDisplay = document.querySelectorAll("output")[0];

Expand All @@ -92,7 +92,7 @@ function updateCellNumber() {
}

addButton.addEventListener("click", () => {
// 在第一行的默认添加单元格
// 在第一行的末尾添加单元格
const newCell = row.insertCell();
newCell.textContent = `单元格 ${cells.length}`;

Expand Down

0 comments on commit b305dbc

Please sign in to comment.