// example:
document.querySelectorAll('.message');
// syntax:
// document.querySelectorAll('.<class-name>')
var elements = document.getElementsByTagName("*");
// This will select all of the text in the textarea or input called element
element.select();