title: JavaScript - OffFocus event?
body: <p>What I want to do is display an input field with the text color <code>black</code>.</p>
  <p>Then when the person clicks inside the input field (<code>onfocus</code>) I want to change the text color to <code>red</code>.</p>
  <p>Then, when the person click outside of the input field (no longer focus), I want to change the text color back to <code>black</code>.</p>
  <p>I know how to handle the JavaScript <code>onfocus</code> event using the following:</p>
  <pre><code>&lt;input ctype=&quot;text&quot; onfocus=&quot;this.style.color='red';&quot; /&gt;
  </code></pre>
  <p><em>But how do I handle the &quot;off focus&quot; to change the text color back to black?</em></p>