function changeColor(newColor) { var elem = document.getElementById('para'); elem.style.background-color = newColor; }