skip to Main Content

Html – Trouble changing background of input textbox

I'm trying to create a textbox where if you submit the correct answer, the textbox's background turns green, and red for the incorrect answer. However, nothing seems to happen for both options. document.querySelector('form').addEventListener('submit', function(event) { //Stuff let input = document.querySelector('input[name="q"]');…

VIEW QUESTION
Back To Top
Search