The TextRange is collapsed to an insertion point at the end of the current bounded range. Then the keyword determines how the insertion point is indexed onwards or backwards.
This method has two arguments. The first argument indicates what to look for when moving the TextRange object. The second indicates how many times to apply that location search. A negative value indicates a backwards search. The insertion point is modified according to the rules determined by this keyword. If the second argument is omitted, it is assumed to be the value 1. The following keywords can be applied:
character
word
sentence
textedit
The character keyword causes the insertion point to be indexed onwards by a single character position.
The word keyword looks for the next word break in the document text.
The sentence keyword looks for the next full stop at the end of a sentence.
The textedit keyword moves the insertion point either to the beginning or end of the original selection.
This method returns an integer describing how many times it was able to move the insertion pointer.
See also: | TextRange.expand() |
Prev | Home | Next |
TextRange.isEqual() | Up | TextRange.moveEnd() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |