Javascripts > Javascript Forms > Select Entire Field Value
Script Title: Select Entire Field Value
Description: Select the value of an entire field.
Example: Available
Copy the following code into your <HEAD></HEAD> tags.<script language="Javascript"> <!-- /* Select All script- By Website Abstraction(http://www.wsabstract.com) Over 400+ 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=10 cols=20>This is some text. This is some text. This is some text. This is some 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