Joydip Panchal Javascript Tutorial
How to access element using Class name attribute?

Syntax :

var element = document.getElementByClassName("test";

Here, element is the list of reference to all class which name is "test"....

You can run the for loop to get the value of all class..

Like,

for(i=0;i<element.length;i++)
// code for access element ... element[i]
Like · Comment ·
Sagar Solanki and Admin like this

Ravi Patel

hi
Like ·
Download Android App