Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Compares an end point of a TextRange object with an end point of another range.
Syntax
iResult = TextRange .compareEndPoints( sType , oRange )Parameters
sType | Required. String that specifies one of the following values:
|
||||||||
oRange | Required. TextRange object that specifies the range to compare with the object. |
Return Value
Integer. Returns one of the following possible values:
-1 | The end point of the object is further to the left than the end point of oRange . |
0 | The end point of the object is at the same location as the end point of oRange . |
1 | The end point of the object is further to the right than the end point of oRange . |
Remarks
A text range has two end points. One end point is located at the beginning of the text range, and the other is located at the end of the text range. An end point also can be characterized as the position between two characters in an HTML document.
As of Microsoft® Internet Explorer 4.0, an end point is relative to text only, not HTML tags.
There are four possible end points in the following HTML: <BODY><P><B>abc
The possible end points are:
An end point cannot be established between the body and the p . Such an end point is considered to be located before the letter a.
This method might not be available on non-Microsoft Win32® platforms.
Standards Information
There is no public standard that applies to this method.
Applies To
|
TextRange |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |