Javascripts > Javascript Forms > Select All Script
Script Title: Select All Script
Description: This script selects all the content in a scrolling textbox.
Example: Available
Select All This is some more text
Copy the following code into your <HEAD></HEAD> tags.<script language="Javascript"> <!-- /* Select All script- By Website Abstraction(http://www.wsabstract.com) Over 200+ free JavaScripts here! */ function selectAll(theField) { var tempval=eval("document."+theField) tempval.focus() tempval.select() } //--> </script>
Copy the following code between the <BODY></BODY> tags of your html page.<form name="test"> <a href="javascript:selectAll('test.select1')">Select All</a><br> <textarea name="select1" rows=5 cols=20>This is some text</textarea> <p> <a href="javascript:selectAll('test.select2')">Select All</a><br> <textarea name="select2" rows=5 cols=20>This is some more text</textarea> </form>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email