set background color dynamically javascript

JavaScript
 document.body.style.backgroundColor="white"
Source

Also in JavaScript: