Name

findText( ) — NN n/a IE 4 DOM n/a

Synopsis

findText(string)

Searches the current TextRange object for a match of a string passed as a parameter. Matching is done on a case-insensitive basis. If there is a match, the TextRange object repositions its start and end points to surround the found text. To continue searching in the document, you must reposition the start point of the text range to the end of the found string (with collapse( )).

Returned Value

Boolean value: true if a match is found; false if unsuccessful.

Parameters

string

A case-insensitive string to be searched.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.