This is a case-insensitive search for a matching text. If the text is located, then the start and end points of the TextRange object are adjusted to encapsulate the found text chunk.
The TextRange needs to be collapsed for this to work. It could be collapsed and made to point at the start of the document if you want to search the whole text, otherwise the search commences at the current insertion point.
This method returns a Boolean true if it found a match and a Boolean false if it didn't.
| Prev | Home | Next |
| TextRange.expand() | Up | TextRange.getBookmark() |
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. | ||