Home > Article > Web Front-end > JS uses the getComputedStyle() method to obtain CSS attribute values_javascript tips
In the process of debugging web pages, js is often used to obtain the CSS style of elements. There are many methods. Now I only summarize the methods I often use as follows:
1. obj.style: This The method is that JS can only get the value written in the style attribute written in the html tag (style="..."), but cannot get the attribute defined in