I
I
i_want_to_know_everything2016-05-07 14:59:26
JavaScript
i_want_to_know_everything, 2016-05-07 14:59:26

js how to separate elements?

In addition to each, is it possible to somehow calculate the number of li for each ul in this example?
https://jsfiddle.net/e3wxLxc7/1/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dark Hole, 2016-05-07
@i_want_to_know_everything

Can. But no cycle.

var elements = document.getElementByTagName('ul');
for(var counter = 0; counter < elements.length; counter++){
  elments[counter].inLength = elements[counter].getElementsByTagName('li').length;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question