Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop through dom elements javascript

//Loop thru DOM elements

var all = document.getElementsByTagName("*");

for (var i=0, max=all.length; i < max; i++) {
     // Do something with the element here
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #loop #dom #elements #javascript
ADD COMMENT
Topic
Name
1+7 =