🔰querying elements
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
JS ⟩ browser ⟩ DOM ⟩ selecting elements
Element ⟩
.closest() - 往上選。
- 往下選。
- returns .
- 只跟自己比較,不往上選,也不往下選。
Document ⟩
DocumentFragment ⟩
can convert into array with Array.from().
many browsers will refuse to return matches for the :link
and :visited
pseudo-classes.