Change input border color if text is typed : <p>I think that Title of my question explains very well what i need. For example my code is</p>

<pre><code>&lt;head&gt; 
&lt;style&gt;
input{ border: 5px solid red;}
&lt;/style&gt;
&lt;/head&gt;
    &lt;div class="in"&gt;
        &lt;input class="input" type="text" name="text" method="post"&gt;
        &lt;/div&gt;
</code></pre>

<p>Now border is Red. I need  to make it black if i will write text in it. Thanks</p>
