Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Text Area Help

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
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
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Give the textarea an id (<textarea id="text"></textarea>)

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

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

Thanks for the help aswell :D
 
0
Close
Appraise.net

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back