The references to setEndPoint MSDN are:
Textrange.setendpoint (Stype, oTextRange)
oTextRange is another TextRange object
Stype is a string type with 4 choices
Starttoend
Starttostart
Endtostart
Endtoend
"A-text range has two endpoints:one at the beginning of the" text range and one in the "end.
The text range has 2 endpoint one in the opening one at the end
<textarea id="runcode1964"><textarea id= "Ice" rows= "5" cols= ">" How to delete the line of the cursor in the textarea? Like the ability to cut rows in Visual Studio. How do I remove the line that the cursor is in textarea? Like the ability to cut rows in Visual Studio. How do I remove the line that the cursor is in textarea? Like the ability to cut rows in Visual Studio. </textarea> <input type= "button" onclick= "Delline ()" value= "delete"/> <script "javascript" > <!--function Delline () {ice.focus (); var r1 = Document.body.createTextRange (); var r2 = Document.body.createTextRange (); var s = document.selection.createRange (); var re = Ice.createtextrange (). Getclientrects (); var t = S.getboundingclientrect (). Top; for (i=0;i<re.length;i++) if (re[i].top >= T) a break; R2.movetopoint (Re[i].left,re[i].top); R1.setendpoint ("Starttostart", r2); R2.movetopoint (Re[i].left,re[i].bottom); R1.setendpoint ("Endtoend", r2); R1.text = ""; }//--> </script></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]