Thursday, 1 September 2016

Select All Feature For Text Area

This script allows you to add a "select all": feature to your form <textarea>s, whereby visitors can easily highlight the containing content with a click on a link.
Example:

Select All


Directions: Simply insert the below in the <body> section of your page:


Select All

It contains the script itself, plus one <textarea> with the Select All feature added. To enable multiple form elements with such a functionality, simply add more of the below link code to the form
<a href="javascript:selectAll('test.select1')">Select All</a><br>
where "test" denotes the name of the form, and "select1", the name of the <textarea> to highlight.

No comments:

Post a Comment