Skip to content

Commit

Permalink
优化翻译
Browse files Browse the repository at this point in the history
  • Loading branch information
vector090 committed Sep 19, 2024
1 parent 258cc0e commit 6bcd2e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 1-js/05-data-types/03-string/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ for (let char of "Hello") {
let str = 'Hi';

str[0] = 'h'; // error
alert( str[0] ); // 无法运行
alert( str[0] ); // 没成功
```

通常的解决方法是创建一个新的字符串,并将其分配给 `str` 而不是以前的字符串。
Expand Down
2 changes: 1 addition & 1 deletion 2-ui/2-events/03-event-delegation/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ One more counter: <input type="button" value="2" data-counter>
</script>
```

如果我们点击按钮 —— 它的值就会增加。但不仅仅是按钮,一般的方法在这里也很重要
如果我们点击按钮 —— 它的值就会增加。这里重要的不是按钮,而是这种通用方法

我们可以根据需要使用 `data-counter` 特性,多少都可以。我们可以随时向 HTML 添加新的特性。使用事件委托,我们属于对 HTML 进行了“扩展”,添加了描述新行为的特性。

Expand Down

0 comments on commit 6bcd2e9

Please sign in to comment.