Uncle Jim's Web Designs
Setting textbox colors using CSS
Author: Jim Stiles

This is a cool way to liven up a boring form. You can specify the background and text color of each text box. Copy the code below and Paste it into a text box tag.

onfocus="style.backgroundColor='#0000FF'; style.color='white'" onblur="style.backgroundColor='white'; style.color='black'"

Replace the #0000FF with the hex code of the color that you want the text box to change to when clicked.
Replace the word white with the color that you want the text to become.

The second set of these commands in the tag return the colors back to the default when the page is clicked outside the text box and should be left as they are.