Page 1 of 1

Input

Posted: Wed Jan 23, 2008 3:02 pm
by westen
I have a text type input and wish the default text to be a different colour to the text entered by a user. Like "Please enter Name here" in light grey and then the text to be black when the user starts to type. Does anyone know if this is possible?

Thanks for the help,
Westen

Re: Input

Posted: Wed Jan 23, 2008 3:12 pm
by Zoxive
This is Client side, and requires Javascript. Nothing to do with PHP.

Code: Select all

<input value="text" onfocus="this.style.color='#FF0000'">