Name
find( ) — NN 4 IE n/a DOM n/a
Synopsis
find(searchString
[,
matchCase
[,
searchUpward
]])
Searches the document body text for a string and selects the first
matching string. Optionally, you can specify whether the search
should be case sensitive or search upward in the document. With the
found text selected, you can use the document.getSelection( )
method to grab a copy of the found text. You don’t,
however, have nearly the dynamic content abilities afforded by
Internet Explorer 4’s TextRange
object (for
Win32).
Returned Value
Boolean value: true
if a match was found;
false
if not.
Parameters
-
searchString
String for which to search the document.
-
matchCase
Boolean value:
true
to allow only exact, case-sensitive matches;false
(default) to use case-insensitive search.-
searchUpward
Boolean value:
true
to search from the current selection position upward through the document;false
(default) to search forward from the current selection position.
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.