Get Element StyleSheet Style in JavaScript

前端 未结 2 1775
谎友^
谎友^ 2020-12-04 02:40

I\'ve been using John Resig\'s getStyle function from Pro JavaScript Techniques to get the style of elements:

function getStyle(elem, name) {
           


        
2条回答
  •  再見小時候
    2020-12-04 02:49

    Maybe your component can wrap the styles that it controls? Then when a style is set through the component the component knows what the user wants.

提交回复
热议问题