Select the text in text area : TextArea « Form Control « JavaScript DHTML






Select the text in text area

  
    
<html>
<body>
<script language="JavaScript">
    function function2() {
        document.all.myTextArea.select();
    }
</script>
<textarea id=myTextArea>Some text</textarea>
<input type="button" value='Select the textarea' onclick="function2()">
</body>
</html>

    
      
        
    
  








Related examples in the same category

1.Textarea rows
2.Is TextArea Multiline
3.TextArea type
4.TextArea wrap
5.TextArea Columns Example
6.TextArea 'value'
7.Set TextArea to be Active
8.Auto type textarea
9.Not empty TextArea
10.Methods and Properties of the Textarea Object
11.TextArea on key up event
12.Append text to textarea
13.TextArea on change event
14.TextArea on key down event
15.TextArea on key press event
16.Getting and Setting a Text Object's Value