You can use the css pseudoclass :focus, but the support for it is pretty poor. Check out the support chart for it [here]. I probably shouldn't say that the support is poor, it's just that IE doesn't like it at all.
"God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "
<textarea class="txt_blue" onfocus="this.className='txt_red'" onblur="this.className='txt_blue'" cols="30" rows="7">The style of this text area is dynamically controlled</textarea>