Change case to lowercase in JS text area
<p>How do I change the case of a character in a textbox/textarea to lowercase onchange?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Page Title&lt;/title&gt;
&lt;script&gt;
function f2(string)
{
string=string.toUpperCase();
alert(string);
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;p&gt;Here are my text entry objects:&lt;/p&gt;
&lt;form&gt;
&lt;p&gt;
Change the scripting (still using one function) so that the text from the alert is shown in uppercase from the textbox but lowercase from the textarea:&lt;br&gt;
&lt;textarea onchange='f2(this.value);'&gt;&lt;/textarea&gt;
&lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
</code></pre>
