Solution for "javascript get element by multiple classes"

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

javascript get element by multiple class

document.getElementsByClassName('class1 class2')

javascript get element by multiple class names

document.querySelectorAll('.a,.b')

getelementbyclassname get multiple class

var element = document.querySelector(".class1.class2");

javascript select element with two classes

Similar codes for "javascript get element by multiple classes"


Latest 'Javascript' questions

Added before "javascript get element by multiple classes"