Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get element by class name

let elementsArray = document.getElementsByClassName("className");
// OR
let element = document.querySelector(".className");
 
PREVIOUS NEXT
Tagged: #javascript #element #class
ADD COMMENT
Topic
Name
1+2 =