how to remove text from text box on first click through js

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
waseem83
Forum Commoner
Posts: 54
Joined: Tue Jun 23, 2009 3:51 am
Contact:

how to remove text from text box on first click through js

Post by waseem83 »

how to remove default text from text box on first click through javascript?
can any body write code for me?
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: how to remove text from text box on first click through js

Post by juma929 »

Hello,

Surely this isnt a PHP question :P.

<input type="text" onClick="this.value=''"/>

I think that should work... :roll:

Thanks.
waseem83
Forum Commoner
Posts: 54
Joined: Tue Jun 23, 2009 3:51 am
Contact:

Re: how to remove text from text box on first click through js

Post by waseem83 »

Thanx but I want to do that only on first click after page load
Post Reply