...

View Full Version : Need to erase the default value of field on focus



hbmarar
03-24-2005, 08:05 AM
well, I had set the value of the text field to 'if other specify but not able to erase the value to ' ' using onFocus="this.value=''".I request members to help me with a answer.

Thanking you in advance

codegoboom
03-24-2005, 04:56 PM
What's the problem?

afru
03-24-2005, 05:19 PM
Hi,

I think this is what you want...


<input type="text" value="Have fun" onfocus='if(this.value==this.defaultValue) this.value="";'>


Next time please be specific with your problem along with ur code...

Have fun :)
Afru.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum