title: Changing background color of text box input not working when empty
body: <p>I am having a tough time with this javascript code to change the background color of a text input if the input is empty.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>function checkFilled() {
      var inputVal = document.getElementById("subEmail").value;
      if (inputVal == "") {
          inputVal.style.backgroundColor = "yellow";
                  }
          }
  </code></pre>
  
  <p>Example: <a href="http://jsfiddle.net/2Xgfr/" rel="noreferrer">http://jsfiddle.net/2Xgfr/</a></p>
  
  <p>I would expect the textbox to come out yellow at the beginning.</p>