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
Input
Moderator: General Moderators
Re: Input
This is Client side, and requires Javascript. Nothing to do with PHP.
Code: Select all
<input value="text" onfocus="this.style.color='#FF0000'">