I'm new to Javascript, but basically what I want to do is get the background from one div's CSS style, and apply it to another div. This is what I have tried but it doesn't work.
NewDiv.style.background = OldDiv.style.background;
I know that I can do:
NewDiv.style.innerHTML = OldDiv.style.inHTML;
But I can't seem to do something similar with the CSS background instead of the html. I'm trying to do it with only javascript and no Jquery