You are here: irt.org | FAQ | JavaScript | Form | 11 | Q1192 [ previous next ]
Try:
<form> <input type="text" value="1234567890" name="myText"> <input type="button" value="select" onFocus="this.form.myText.select()" onClick="this.form.myText.select()"> </form>
or:
<form name="myForm"> <input type="text" value="1234567890" name="myText"> </form> <script language="JavaScript"><!-- document.myForm.myText.select(); //--></script>