Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to find the index of an item in nodelist in js

let nodes = document.getElementsByTagName('*');
Array.prototype.indexOf.call(nodes, document.body);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #index #item #nodelist #js
ADD COMMENT
Topic
Name
3+2 =