PHP scripts and programs for Beginner to Master

php programs, php ready to use scripts & functions, css tutorials, html, javascripts, ajax examples for Beginner to Master

Sometimes we require that when the users click on a textarea at that time all the text should get selected.
This can be done with a small javascript.







When a user clicks on a textarea then all the contents will get selected.

I'm reading: onclick select the text of a textareaTweet this!

2 comments:

Thanks that's what i was looking for...... :)

Great code, I was exactly looking for this.
Searched the web for this great piece of code.
(I have the boxes in a while loop, and other codes didn't work, they keep selected the first area box, but now, it selects which you click, thats just great!!

Thank you very much, it helped me a lot!

Post a Comment