css background image onerror code example
Example 1: js background image
document.body.style.backgroundImage = "url('img_tree.png')";
Example 2: background image css
html,body {
background-image: url("your.picture");
}
document.body.style.backgroundImage = "url('img_tree.png')";
html,body {
background-image: url("your.picture");
}