Answers for "select all child elements with specific class javascript"

2

get all the child of the same class javascript

var doc = document.getElementById("test");
var notes = null;
for (var i = 0; i < doc.childNodes.length; i++) {
    if (doc.childNodes[i].className == "4") {
      notes = doc.childNodes[i];
      break;
    }        
}
Posted by: Guest on February-13-2020
1

get all child element of class javascript

var parent = document.getElementById('test');
var children = parent.getElementsByClassName('four');
Posted by: Guest on October-08-2021

Code answers related to "select all child elements with specific class javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language