diff --git a/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/solution.md b/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/solution.md index 7476de912f..922b940006 100644 --- a/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/solution.md +++ b/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/solution.md @@ -1,8 +1,8 @@ 回答:**1 和 3**。 -所有命令行都是将 `text` “作为文本”添加到 `elem`。 +这两个命令都会将 `text` “作为文本”添加到 `elem` 中。 -这里有个简单的例子: +这是一个例子: ```html run height=80
@@ -12,7 +12,7 @@ let text = 'text'; elem1.append(document.createTextNode(text)); - elem2.textContent = text; - elem3.innerHTML = text; + elem2.innerHTML = text; + elem3.textContent = text; ``` diff --git a/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md b/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md index 4dcd3fa32b..4dace2bb5f 100644 --- a/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md +++ b/2-ui/1-document/07-modifying-document/1-createtextnode-vs-innerhtml/task.md @@ -2,11 +2,11 @@ importance: 5 --- -# 对比 createTextNode、innerHTML 和 textContent +# createTextNode vs innerHTML vs textContent 我们有一个空的 DOM 元素 `elem` 和一个字符串 `text`。 -以下这三个命令行的结果是一样的吗? +下面这 3 个命令中的哪个命令做的是完全相同的事儿? 1. `elem.append(document.createTextNode(text))` 2. `elem.innerHTML = text` diff --git a/2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md b/2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md index 8c94a8e85c..b09209a5cf 100644 --- a/2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md +++ b/2-ui/1-document/07-modifying-document/10-clock-setinterval/solution.md @@ -1,6 +1,6 @@ -首先,使用 HTML/CSS。 +首先,让我们编写 HTML/CSS。 -每个时间组件在``标签中看起来很棒: +时间的每个组件都有其自己的 ``,那将会看起来很棒: ```html| Name | -Surname | -Age | -
|---|---|---|
| John | -Smith | -10 | -
| Pete | -Brown | -15 | -
| Ann | -Lee | -5 | -
| ... | -... | -... | -
| Name | Surname | Age | +
| John | Smith | 10 | +
| Pete | Brown | 15 | +
| Ann | Lee | 5 | +
| ... | ... | ... | +
"</tr><tr>"。
-4. 如果天数遍历完但 table 没有填满,就用空的 `"</tr><tr>"。
+5. 如果该月结束,但表格的行尚未填满,就用空的 `