Home / Free JavaScripts / Forms / Here

Cut & Paste "Select-all" form element script

Credit: JavaScript Kit

Description: 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. Dynamic Drive, our partner site, uses something similar to allow its users to conveniently copy scripts on the site.


Select All

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

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.


JavaScript Tools:
Site Info

CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info