Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript loop through class elements

var els = document.getElementsByClassName("myClass");
for(var i = 0; i < els.length; i++)
{
  console.log(els[i]);
}
 
PREVIOUS NEXT
Tagged: #javascript #loop #class #elements
ADD COMMENT
Topic
Name
8+7 =