Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to loop through all tags in html

var tags = document.getElementsByTagName("*");
for (var i=0, max=tags.length; i < max; i++) {
   console.log(tags[i]);
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #loop #tags #html
ADD COMMENT
Topic
Name
6+7 =