I have this function that changes the src of an img:
window.document.images['img'].src = n_src;
<img src="" name="img"/>
But I wanted to change the background url of the style:
<div name="img" style="background: url()"></div>
What is the best way to do this?