title: javascript to change the color of text based on a condition
body: <p>Looking for a simple java script, and the html that will change the color of the font if the values are:0-30 = green 30-60 = yellow 60-100 = red.</p>
  
  <p>Excuse the poorly written psudo-ish code here...</p>
  
  <pre><code>    &lt;script&gt;
      var low=green;
      var medium=yellow;
      var error=red;
  
      function changeColor{
  
      if  var low then display green;
      if var medium then display yellow;
      if var error then display red
  
      }
  
      &lt;/script&gt;
  
  
      &lt;body&gt;
      &lt;p&gt;&lt;font color=(changeColor)&gt;30&lt;/font&gt;&lt;/p&gt;
      &lt;/body&gt;
  </code></pre>