[Javascript] Textbox Highlighting

Dan Costea costea.dan at ssi-schaefer.ro
Tue Dec 9 11:14:54 CST 2003


you can use the .focus () and .select () methods of the INPUT object. For example:

... 
<input name="lala" value="text..."/>
...
<script>
 var txtTest = document.all["lala"];
 txtTest.focus ();
 txtTest.select ();
</script>


Dan.
  ----- Original Message ----- 
  From: Dave Stoltz 
  To: '[JavaScript List]' 
  Sent: Tuesday, December 09, 2003 7:08 PM
  Subject: [Javascript] Textbox Highlighting


  How can I set focus to a form textbox, and highlight the text in the box (so the user doesn't have to highlight with the mouse)???

  Thanks!



------------------------------------------------------------------------------


  _______________________________________________
  Javascript mailing list
  Javascript at LaTech.edu
  https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20031209/3834c949/attachment.htm>


More information about the Javascript mailing list