Skip to content

Commit b2995a3

Browse files
committed
docs(dom): edit element
1 parent 0f6a171 commit b2995a3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/bom/form.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div>
1010
<label for="name">用户名:</label>
1111
<input type="text" id="name" name="user_name" />
12-
<div>
12+
</div>
1313
<div>
1414
<label for="passwd">密码:</label>
1515
<input type="password" id="passwd" name="user_passwd" />

docs/dom/document.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,10 @@ document.referrer
269269

270270
它的值有四种可能。
271271

272-
- visible:页面可见。注意,页面可能是部分可见,即不是焦点窗口,前面被其他窗口部分挡住了。
273-
- hidden页面不可见,有可能窗口最小化,或者浏览器切换到了另一个 Tab。
274-
- prerender:页面处于正在渲染状态,对于用于来说,该页面不可见。
275-
- unloaded:页面从内存里面卸载了。
272+
> - `visible`:页面可见。注意,页面可能是部分可见,即不是焦点窗口,前面被其他窗口部分挡住了。
273+
> - `hidden`页面不可见,有可能窗口最小化,或者浏览器切换到了另一个 Tab。
274+
> - `prerender`:页面处于正在渲染状态,对于用户来说,该页面不可见。
275+
> - `unloaded`:页面从内存里面卸载了。
276276
277277
这个属性可以用在页面加载时,防止加载某些资源;或者页面不可见时,停掉一些页面功能。
278278

docs/dom/element.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ if (boolValue) {
226226
// ...
227227
// </article>
228228
var article = document.getElementById('foo');
229-
foo.dataset.columns // "3"
230-
foo.dataset.indexNumber // "12314"
231-
foo.dataset.parent // "cars"
229+
article.dataset.columns // "3"
230+
article.dataset.indexNumber // "12314"
231+
article.dataset.parent // "cars"
232232
```
233233

234234
注意,`dataset`上面的各个属性返回都是字符串。

0 commit comments

Comments
 (0)