-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
chrome中有很多的方便的快捷键,这记录下
$的使用
- 纯$
选中一个DOM节点,然后控制台输入,$0你就能取到该节点,但前提是当前环境是纯净的~
例如我选中了一个title节点:
$0 === document.querySelector('title') // true对应的 $1 取的是其直接的父级元素
$1 === document.body // true如果说 $ 是 document.querySelector 的简写,该方法选择的是某个具体单一的元素,那么对应的 $$ 则是 document.querySelectotAll 外加 Array.from() 的简写
-
$i
该方法需要安装google插件 Console Importer ,用气使用npm包很方便的下载调试。

====end====
Metadata
Metadata
Assignees
Labels
No labels


