Full version: jsB@nk » Form » 'Select-all' form element
URL: https://www.javascriptbank.com/select-all-form-element.html
Select the text from any form with the click of a button, just as used on the JavaScript Source. Easy!
Full version: jsB@nk » Form » 'Select-all' form element
URL: https://www.javascriptbank.com/select-all-form-element.html
<script language="Javascript"><!--function selectAll(theField) {var tempval=eval("document."+theField)tempval.focus()tempval.select()}//--></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<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><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->