js change image background code example
Example 1: change background with js
document.body.style.backgroundColor = "red";
Example 2: change background with js
document.getElementById("myDIV").style.background = "url('smiley.gif') blue repeat-x center";