Find Dialog: window.find()
Question: How do I invoke the browser's Find dialog from JavaScript?
Answer:
In Firefox and some Gecko browsers, you can display the browser's Find dialog
Try these window.find() techniques here and below: This example was created using the following code:<input type=button value="window.find()" onclick="if(window.find)window.find(); else alert('Your browser does not support \'window.find()\'!') "> <input type=button value="window.find('text',0,0,0,0,0,1)" onclick="if(window.find)window.find('text',0,0,0,0,0,1); else alert('Your browser does not support \'window.find()\'!') ">Internet Explorer does not support window.find() .
However, in most browsers including Internet Explorer,
you can write a script that finds a user-defined string on the page.
For more information on this technique, see
Searching for text.
The general syntax of the window.find(parameters) window.find() // Netscape and Firefox only! You can use up to seven parameters; they are explained below.
All parameters are optional; the default is
See also other JavaScript dialogs: |
Copyright © 1999-2011, JavaScripter.net.