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