Mega Code Archive

 
Categories / JavaScript DHTML / Form Control
 

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>