user207421
0
Q:

html get elements by class


 var x = document.getElementsByClassName("example");

 
2
document.getElementsByClassName("legend").style.display="none";
2
let element = document.querySelector('.preset');
let style = getComputedStyle(element);
let bg = style.backgroundColor;
0

New to Communities?

Join the community