PDA

View Full Version : forms and css


ali_b
01-20-2008, 03:56 PM
Hello,

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 :)

Ali

ali_b
01-20-2008, 03: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=''"/>

cheers!

domedia
01-20-2008, 05: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 ;)