posted 12 years ago
Question.
I know you can style an element like
element.style.backgroundcolor = ...
what are you not able to put the .backgroundcolor into a variable like such...
var bgcolor = "backgroundcolor";
element.style.bgcolor = "red";
I tried it and it doesnt seem to work, I was more or less wonder why not?
Thanks
Probably going to ask a lot of possibly stupid questions...but how else will I learn? am I right!