I have a called spn1, which has some style from inline + CSS file.
spn1
I have another called spn2
spn2
Try using this:
document.getElementById("spn2").style = document.getElementById("spn1").style;