I am having a tough time with this javascript code to change the background color of a text input if the input is empty.
Here is the code:
function c
Don't add styles to value of input so use like
function checkFilled() { var inputElem = document.getElementById("subEmail"); if (inputElem.value == "") { inputElem.style.backgroundColor = "yellow"; } }