title: Checking form input for text and changing it's color
body: <p>Here I have a problem which I can't get over with. This is the code and I want the script to change the form input's color when the entered text changes:</p>
  
  <pre><code>function checkName(name)
  {
  if (name.value == "value1" || name.value == "value2" || name.value == "value3" || name.value == "value4" || name.value == "value5" || name.value == "value6"){
   document.forms['un'].elements['name'].style.color='#ffbb00'
  }
  else {
   document.forms['un'].elements['name'].style.color='#000000'
  }
  }
  </code></pre>
  
  <p>As you can see when the entered text matches with one of the provided ones, it should turn orange, and when not, it shall be black. (I have an input toggling this function with an onChange thing)
  I just can't make it work so I can have multiple choices on when to change color, and also change back when the statement becomes invalid. Any help?</p>