how to change the background of a html page with javascript code example Example: set background color dynamically javascript document.body.style.backgroundColor="white"