121
rated 0 times
[
124]
[
3]
/ answers: 1 / hits: 18430
/ 9 Years ago, fri, february 5, 2016, 12:00:00
The following command
document.querySelectorAll('#divConfirm table')[1].querySelectorAll('tr')
gives a node list with 3 tablerow (tr) elements in it. If I know the list size, I can access the last element via.item(2)
.
Is there a way to get the last element directly without resorting to .length first?
More From » javascript