Hello, I have a piece of javascript code like this right now.
document.getElementById(pos).style.backgroundColor='#800080';
I want to refer to the following gradient background color instead of a staic value '#800080' in the code.
.myBK {background: -moz-linear-gradient(top, #ccc, #000);}
What is the correct syntax to do that?
I tried this but it does not work.
document.getElementById(pos).style.backgroundColor=.myBK;
Thanks a lot.