select all elements code example
Example 1: selet all elemnts
var elems = document.body.getElementsByTagName("*");
Example 2: javascript select all elements
// example:
document.querySelectorAll('.message');
// syntax:
// document.querySelectorAll('.<class-name>')
Example 3: select all elements javascript
var elements = document.getElementsByTagName("*");