how to get class element in javascript code example
Example 1: javascript get class name
document.getElementById("myDIV").className = "mystyle";
Example 2: javascript document object model getElementsByClassName
document.getElementsByClassName('test')
Example 3: js get class property
let element = document.querySelector('.preset');
let style = getComputedStyle(element);
let bg = style.backgroundColor;