Set TextArea to be Active : TextArea « Form Control « JavaScript DHTML






Set TextArea to be Active

  
    
<html>
<body>
<script language="JavaScript">
    function function1() {
        document.all.myTextArea.setActive();
    }
</script>
<textarea id="myTextArea">Some text</textarea>
<input type="button" 
       value='Insert the cursor inside the textarea' 
       onclick="function1();">
</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.Select the text in text area
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