dimanche 3 janvier 2021

trying to get the values of all li elements in an ul by loop js?

How to reach ul list each value by js or jq to use it to reach any parts in html ?

var nav = document.getElementsByClassName('navigation'),
item = nav.getElementsbyTagName('li'),
i; 

for(i =0;i<item.length;i++ ){
console.log(item[i].childNodes);
i++;
}



Aucun commentaire:

Enregistrer un commentaire