get two elements in one JS different classes code example Example: javascript select element with two classes var element = document.querySelector(".class1.class2");