Select part of textarea using javascript
Hi,I'd like to use javascript to select part of a textarea. To be more specific, I have the start and end location in the textarea I want to select. How can I use this cordinates to make a selection in the textarea that works in both Firefox and IE.Any suggestions welcome!Thank you for your...
|
selected text
Quote:
<table cellSpacing=2 cellPadding=3 width="400px"> <tr> <td class=table_head vAlign=top width="40%">Coding</td> <td vAlign=top width="10%"> </td> </tr> <tr> <td class=table_text vAlign=top width="40%"><textarea cols=55 name="mytextarea">"Some Text Goes Here"</textarea></td> <td vAlign=top width="10%"><p><input type=button value="[Select Text]" onClick="mytextarea.focus();mytextarea.select();" border=0 /></p></td> </tr></table> |
All times are GMT. The time now is 04:31 PM. |
Powered by vBulletin® Version 3.0.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.