Home | Top | Website design | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.


setEndPoint Method

Sets the endpoint of one range based on the endpoint of another range.

Syntax

TextRange.setEndPoint( sType , oTextRange )

Parameters

sType Required. String  that specifies the endpoint to transfer using one of the following values.
StartToEnd Move the start of the TextRange object to the end of the specified oTextRange parameter.
StartToStart Move the start of the TextRange object to the start of the specified oTextRange parameter.
EndToStart Move the end of the TextRange object to the start of the specified oTextRange parameter.
EndToEnd Move the end of the TextRange object to the end of the specified oTextRange parameter.
oTextRange Required. TextRange object from which the source endpoint is to be taken.

Return Value

No return value.

Remarks

A text range has two endpoints: one at the beginning of the text range and one at the end. An endpoint can also be the position between two characters in an HTML document.

In Microsoft® Internet Explorer 4.0, an endpoint is relative to text only, not HTML tags.

There are four possible endpoint locations in the following HTML. <BODY><P><B>abc

The possible endpoint locations are:

In Internet Explorer 4.0, an endpoint cannot be established between body and p . Specifying an endpoint between body and p is interpreted as if it occurs before the letter a.

This feature might not be available on platforms other than Microsoft Win32®.

Example

The following example shows how to use the setEndPoint method to set the start point of the current range ( r1 ) to the endpoint of the second range ( r2 ).

<SCRIPT LANGUAGE="JScript"> r1. setEndPoint ("StartToEnd", r2); </SCRIPT>

Standards Information

There is no public standard that applies to this method.

Applies To

Platform Version
Win16:
Win32:
Windows CE:
Unix:
Mac:
 
TextRange
Home | Top | Website design | JavaScript Editor JavaScript EditorGet Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.