Code Snippet: To set the Background Image to the body
document.body.style.backgroundImage = "url('path/to/image.jpg')";
Additionally, you can set other background properties such as background repeat, position, and size using the
background property. For example:
document.body.style.background = "url('path/to/image.jpg') no-repeat center/cover";
This sets the background image to cover the entire body, centered, without repeating. Adjust the values according to your specific needs.