I want to enable a javascript code that lets me select all of a word in 1 click. Like those select all boxes. How can I enable javascript in the content box~??
Instead of triple clicking to select the entire line, I jst want the user to click once to its all selected.
<script type="text/javascript">
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
Textarea:<br>
<textarea rows="3" id="txtarea" onClick="SelectAll('txtarea');" style="width:200px" >This text you can select all by clicking here </textarea>
Input TextBox:<br>
<input type="text" id="txtfld" onClick="SelectAll('txtfld');" style="width:200px" value = "This text you can select all" />