Home >Web Front-end >JS Tutorial >JavaScript code to position the cursor on a certain line of textarea_form effects
<script> <br> function goL(Line) <br> { <br> ta1.focus(); <br> var v=ta1.value.split('n'); <br> ch=0; <br> for(var i=0;i<Line-1;i ) <BR> ch =v[i].length; <BR> var o=ta1.createTextRange(); <BR> o.move("character",ch); <BR> o.select(); <BR> } <BR> </script>