var TextInput = document.getElementById('TextInput'); var Fonts = document.getElementById('Fonts'); var Preview = document.getElementById('Preview'); TextInput.addEventListener('keyup', textChange, false); function textChange(){ Preview.textContent = TextInput.value; } Fonts.addEventListener('change', fontChange, false); function fontChange(){ Preview.className = this.value; console.log(this.value) }