JavaScript - An open source scripting language, it allows the creation of dynamic web page content.  Home Web Programming JavaScript Select Textarea Content
Your Ad Here

Select Textarea Content


 
 
Click to Select
 
 

Put this code into your page:

<html>
<head>

<style>
.text
{
FONT: 10pt arial;
}
</style>

<script>
function selectText(){
document.TheForm.TheText.focus();
document.TheForm.TheText.select();
}
</script>

</head>

<body>
<br><br><br>
<center>
<TABLE width="150" border="0" cellpadding="0" cellspacing="0" bgcolor=#F5F4E0>
<tr>
<td colspan=3><img src=images/spacer.gif height=10></td>
</tr>
<tr>
<td><img src=images/spacer.gif width=10></td>
<td bgcolor=white>
<table border=0 cellpadding="0" cellspacing="3">
<tr>
<td valign="top" width=175>

<center><a href="javascript:selectText()" class=text>Click to Select</a></center>

<form NAME="TheForm">
<textarea rows="5" cols="20" NAME="TheText" wrap="on">
This is the text in the textarea. Change it to suit.
</textarea>
</form>

</td>
</tr>
</table>
</td>
<td><img src=images/spacer.gif width=10></td>
</tr>
<tr>
<td colspan=3><img src=images/spacer.gif height=10></td>
</tr>
</table>
</center>

</body>
</html>



Author's URL: Codelifter
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
Share print this page subscribe to newsletter subscribe to rss

JavaScript - An open source scripting language, it allows the creation of dynamic web page content. More Web Programming: Most Popular Materials | Fresh Materials | More JavaScript Tutorials at LearnPHP.org

No comments yet...
Add comments to "Select Textarea Content"

Captcha