View Full Version : forms and css

01-20-2008, 02:56 PM

I was just wondering how to do something with some forms on my website.

Ive occasionally seen on website they have text feilds with text actually inside the form but then when you click on it that text disapears so you can type in the appropriate information.

How do you do this?

I know you can do this <input name="" type="text" value="username" /> but with this when you click in the field the world "username" doesnt disapear.

Thanks for your help :)


01-20-2008, 02:59 PM
lol... i found out how to do it. if anyone is interested it is <input name="" type="text" value="username" onfocus="this.value=''"/>


01-20-2008, 04:10 PM
Yes, all you have to do often is just to view the source of the website that has the effect you're looking for ;)