javascript get element by multiple class

50

javascript get element by multiple class -

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

javascript get element by multiple class names -

document.getElementsByClassName('class1 class2')

getelementbyclassname get multiple class -

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

Comments

Submit
0 Comments