Highlight Textarea on HREF Click

[Total: 0    Average: 0/5]

This shows how to select the contents of a textarea form component.

Body Code:

<form name=exf1>
<textarea name=t1>This is some text in a textarea box</textarea>
</form>
<HR>
<a href="javascript:doIt()">Select Text</a>
<script>
function doIt()
{
  document.exf1.t1.select();
}
</script>

Times Viewed: 1

Leave a Reply

Your email address will not be published. Required fields are marked *