how to set background in javascript code example
Example 1: set attribute javascript background image
document.body.style.backgroundImage = "url('img_tree.png')";
Example 2: document.body.style.background
// Change the background color to red
document.body.style.backgroundColor = "red";