get all the child of the same class javascript

Solutions on MaxInterview for get all the child of the same class javascript by the best coders in the world

showing results for - "get all the child of the same class javascript"
Jesús
10 Jun 2016
1var doc = document.getElementById("test");
2var notes = null;
3for (var i = 0; i < doc.childNodes.length; i++) {
4    if (doc.childNodes[i].className == "4") {
5      notes = doc.childNodes[i];
6      break;
7    }        
8}