add class through docum,net .get elemet by id javascript code example Example: javascript document object model getElementsByClassName document.getElementsByClassName('test')