fix: spacing in JS Selector table
This commit is contained in:
1 parent
2b967a5217
commit
57dbe4e2d5
1 file changed
+2
-2
@@ -40,8 +40,8 @@ document.getElementById返回具有给定id的元素的DOM对象(注意,你可
|
||||
文档和其他DOM对象中的方法:
|
||||
| 名称 | 描述 |
|
||||
| ----------- | ----------- |
|
||||
|document.querySelector(selector) | 返回与给定的CSS选择器字符串匹配的第一个元素 |
|
||||
|document.querySelectorAll(selector) | 返回一个数组,其中包含所有与给定的CSS选择器字符串匹配的元素 |
|
||||
| document.querySelector(selector) | 返回与给定的CSS选择器字符串匹配的第一个元素 |
|
||||
| document.querySelectorAll(selector) | 返回一个数组,其中包含所有与给定的CSS选择器字符串匹配的元素 |
|
||||
|
||||
## 常见的querySelector和querySelectorAll的错误
|
||||
有很多人一般都会忘记写(.)class属性和(#)id属性的html元素
|
||||
|
||||
Reference in new issue
Block a user