window.find()

JavaScript1.2+, JScript3.0 Nav4+, IE4+ Syntax

							window.find()

Description

The find() method of the Window object displays a find dialog box when invoked. This allows a user to search for a string in the page from which it was invoked.

Example

Listing 7.538 has a function that pops up a Find box when it is called. The result of running this script can be seen in Figure 7.19.

Figure 7.19. A find box created with the Window.find() method.

Listing 7.538 A Find Box That Can Be Used to Search for Text in the Document
 <script language="JavaScript1.2"> <!-- Hide function mySearch(){ window.find(); } // End hide ---> </script> ...

Get Pure JavaScript 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.