Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Select element class (pure Javascript) – is this correct? Reply To: Select element class (pure Javascript) – is this correct?

#150584
whatsoever
Participant

You can select html and body using document.querySelectorAll(‘html, body’). Keep in mind that it is supported on IE8+, Chrome 1+, FF3.5+, Opera 10+ and Safari 3.2+