Evertjan.
3/22/2016 3:31:00 PM
Cezary Tomczyk <cezary.tomczyk@gmail.com> wrote on 22 Mar 2016 in
comp.lang.javascript:
> I run from console following method:
A "method"???
> document.querySelectorAll('[id]')
Any word in the string not starting with a # ore a . would be a tagName.
And also an id must be unique, so if you mean an id by '[id]',
that would not me my idea of sensible querySelectorAll('#myId')[0].
These are more logical, imho:
document.querySelectorAll('div')[0]
document.querySelectorAll('.myClass')[3]
document.querySelector('#myId')
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)