change background with javascript code example

Example 1: javascript change frame background

window.frames['frameName'].document.body.style.backgroundColor = "#000";

Example 2: JavaScript Change Background Color

var element = document.body;
element.style.backgroundColor = "blue";

Example 3: javascript change background color

function changeBackground(color) {
   document.body.style.background = color;
}

window.addEventListener("load",function() { changeBackground('red') });

Example 4: change background with js

document.body.style.backgroundColor = "red";

Example 5: change background with js

object.style.background = "color image
repeat attachment position size origin clip|initial|inherit"