QuerySelectorAll - get ALL tags that have a set of attributes?

For example, I need to have a list of all tags with a set of id attributes (this can be any other attribute, id is just an example).

+6
source share
1 answer

Try the following:

 document.querySelectorAll('[id]') 
+11
source

Source: https://habr.com/ru/post/904846/


All Articles