change background of image js code example
Example 1: change background with js
document.body.style.backgroundColor = "red";
Example 2: change background with js
document.body.style.background = "#f3f3f3 url('img_tree.png') no-repeat right
top";
Example 3: change background with js
document.body.style.backgroundPosition = "top right";
Example 4: change background with js
document.body.style.backgroundRepeat = "repeat-y";