»
EnglishFrenchVietnamese

Print - 'Select-all' form element - JavaScriptBank.com

Full version: jsB@nk » Form » 'Select-all' form element
URL: http://www.javascriptbank.com/select-all-form-element.html

'Select-all' form element © JavaScriptBank.comSelect 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: http://www.javascriptbank.com/select-all-form-element.html



JavaScript
<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-->


HTML
<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-->