Anyone know what the code would be to change the background on a div that has been set in CSS.
I know that
Code:
document.getElementById('img').style.
accesses the Div with the Id img, but I can't seem to find the correct syntax to change the background:url().
edit: Figures right after I ask I figure it out.
Here is the code if anyone needs it:
Code:
document.getElementById('div').style.background='url(file)';
Where div is the tag ID you want to use it on and file is the fiel you want as the background.