Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to select all elements of type js

for(let element of document.getElementsByTagName('button')){
  element.addEventListener('click',GetInnerHTML);
}
function GetInnerHTML(){console.log("My content is '" + this.innerHTML + "'");}
 
PREVIOUS NEXT
Tagged: #select #elements #type #js
ADD COMMENT
Topic
Name
1+8 =