Please Log In to save to favorites
TAGs
get all elements with a particular tag in javascript


Versions
Get elements of a particular tag with javascript
Get all the tags in the document.
      
    1.   var el = document.getElementsByTagName("strike");
    2.   
    3.   for ( var i = 0 ; i < el.length ; i++ ) {
    4.    alert(el[i].innerHTML);
    5.   }
Comments