Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get class property

let element = document.querySelector('.preset');
let style = getComputedStyle(element);
let bg = style.backgroundColor;
 
PREVIOUS NEXT
Tagged: #js #class #property
ADD COMMENT
Topic
Name
1+3 =