function color() { document.getElementById("box").style.backgroundColor = "yellow"; } function color2() { document.getElementById("box2").style.backgroundColor = "yellow"; }