*!* var xXx = document.querySelector('.box'); */!* var select = document.getElementById('select_color'); select.onchange = function(){ xXx.style.background = select.options[select.selectedIndex].value; }