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 93ae862fd6..7476de912f 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 @@ -Answer: **1 and 3**. +回答:**1 和 3**。 -Both commands result in adding the `text` "as text" into the `elem`. +所有命令行都是将 `text` “作为文本”添加到 `elem`。 -Here's an example: +这里有个简单的例子: ```html run height=80
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 e127bc0efa..4dcd3fa32b 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 vs innerHTML vs textContent +# 对比 createTextNode、innerHTML 和 textContent -We have an empty DOM element `elem` and a string `text`. +我们有一个空的 DOM 元素 `elem` 和一个字符串 `text`。 -Which of these 3 commands do exactly the same? +以下这三个命令行的结果是一样的吗? 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 15238fcf4f..8c94a8e85c 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 @@ -First, let's make HTML/CSS. +首先,使用 HTML/CSS。 -Each component of the time would look great in its own ``: +每个时间组件在``标签中看起来很棒: ```html"</tr><tr>".
-4. If the month has finished, but the table row is not yet full, add empty `"</tr><tr>"。
+4. 如果天数遍历完但 table 没有填满,就用空的 `