SyntaxFix
Write A Post
Hire A Developer
Questions
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"; } }