var color = '#'+(Math.random()*0xFFFFFF<<0).toString(16); function changeBackground(color) { document.body.style.background = color; }