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:
trueto allow only exact, case-sensitive matches;false(default) to use case-insensitive search.-
searchUpward Boolean value:
trueto search from the current selection position upward through the document;false(default) to search forward from the current selection position.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access