Text Box

L

Lou Civitella

I have a asp.net textbox on my page with a default value in it. I would like
the box to be cleared when some one clicks on the box.
How do I go about doing this?
 
N

neilmcguigan

you need to add some client-side javascript like this:

onfocus=" if ( this.value == 'some default' ) this.value=''; " onblur="
if ( this.value == '' ) this.value = 'some default' ; "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top