var list = document.getElementsByClassName("class1 class2"); var list = document.querySelectorAll(".class1.class2");