Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop through elements by name js

// ES6 solution
const children = [...parent.getElementsByTagName('tag')];
children.forEach((child) => { /* Do something; */ });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #elements #js
ADD COMMENT
Topic
Name
5+4 =