zwkle Posted March 1, 2009 Share Posted March 1, 2009 Hi, I have this line which nearly does what I want: <input type='text' name='text' style='width:505px; height:190px; color:rgb(160,160,160);' value=' Max. 500 characters' onClick="this.value=''"> This gives me a text box with "Max. 500 characters" in the box which disappears when the user clicks on the box, and where "Max. 500 characters" is colored light-grey. When the user then types something into the box, I want them to be typing in black, rather than light-grey. Not sure how to do this. Can anyone help? Many thanks, Andrew Link to comment https://forums.phpfreaks.com/topic/147411-solved-text-colors-in-forms-question/ Share on other sites More sharing options...
zwkle Posted March 2, 2009 Author Share Posted March 2, 2009 I managed to solve this by adding style.color='black'; to the onclick="", so the text color is changed when the user clicks in the form Link to comment https://forums.phpfreaks.com/topic/147411-solved-text-colors-in-forms-question/#findComment-774531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.