Select the entrie contents of a form field

D

Dave

I want to be able to have the entire contents of a form text filed selected
by a user with a single mouse click for editing.

This is for a pre-filled field like entire your name. I have seen this on
web sites but I don't know how to do it or the key words to find info about
it.

Can anyone help?

Thanks

Dave
 
D

Dave

Got it!

onFocus="this.select()"

For example:

<form>
<textarea cols=15 rows=15 onFocus="this.select()">This is a test</textarea>
</form>
 

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

Top