Unstoppable Domains

Text Area Help

Spaceship Spaceship
Watch

dc1pop

VIP Member
Impact
13
I have a text area section on my website i would like to create a button called "select all" this will then select the code within the given textarea.

Ive tried to do a few searchs on google but cant find the code Ive seen it done on some sites so it must be doable :)

Thanks for any help!

Regards,
Darren
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Give the textarea an id (<textarea id="text"></textarea>)

And do
<input type="button" onclick="document.getElementById('text').select();" value="select text" />
 
1
•••
Brillant! Great Help! Thanks :)
 
0
•••
You don't even need to use a button ;)

HTML:
<textarea name="bleh" rows="5" cols="40" onClick="this.select();">bleh</textarea>
 
1
•••
hmm well didnt know that :D

Thanks for the help aswell :D
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back