Highlight The Contents Of A Textarea With JavaScript

Wednesday, August 27, 2008 - 09:47

If you want to give your users a little snippet of code it is nice to give them the option of selecting the entire block of code without having to highlight the text manually. This can be done with a simple JavaScript button.

Take the following form: