html get elements by class

JavaScript
 var x = document.getElementsByClassName("example");

 
Source

Also in JavaScript: