Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript iterate over divs

var divs = document.getElementsByTagName("div");
for(var i = 0; i < divs.length; i++){
   //do something to each div like
   divs[i].innerHTML = "something new...";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #iterate #divs
ADD COMMENT
Topic
Name
3+5 =