Clone style in jQuery?

后端 未结 9 1607
轻奢々
轻奢々 2021-02-05 03:56

I have a called spn1, which has some style from inline + CSS file.

I have another called spn2

9条回答
  •  灰色年华
    2021-02-05 04:39

    Try using this:

    document.getElementById("spn2").style = document.getElementById("spn1").style;
    

提交回复
热议问题