0

How can we access any value from css such as "height:20px" using javascript

I want to access width of a shape designed on css and want to access its value using javascript

18th Sep 2020, 12:34 AM
Manoj Joshi
Manoj Joshi - avatar
2 Answers
18th Sep 2020, 1:32 AM
CalviŐČ
CalviŐČ - avatar
+ 1
Use object.getComputedStyle(element,pseudo-element).getPropertyValue(propertyname) https://www.w3schools.com/jsref/jsref_getcomputedstyle.asp
18th Sep 2020, 1:26 AM
Vadivelan