About setEndPoint MSDN provides the reference _ basics

Source: Internet
Author: User
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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.