Set TextArea to be Active : TextArea « Form Control « JavaScript DHTML
- JavaScript DHTML
- Form Control
- TextArea
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