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