Unstoppable Domains โ€” Expired Auctions

Text Area Help

NamecheapNamecheap
Watch
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.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
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 TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Zero Commission
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back