Dapatkan Elemen Anak dengan JavaScript kelas
var element = document.querySelector('#Element');
var elementChildren = element.querySelectorAll('.Element-child');
Jittery Jay
var element = document.querySelector('#Element');
var elementChildren = element.querySelectorAll('.Element-child');
// get child element of #test with class my-class
var testContainer = document.querySelector('#test');
var childNodeByClass = testContainer.querySelector('.my-class');
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;
}
}