Skip to content Skip to sidebar Skip to footer

How Can I Programmatically Trigger The Search Of My Browser?

What I like to do is to programmatically trigger the on-page search functionality of my browser from JavaScript. I.e. when a page is loaded and the the user presses Ctrl+F, a searc

Solution 1:

There is the non standard window#find, currently supported by Chrome, FF, and Safari. However, but support is not guaranteed:

setTimeout(function() {
  find('text');
}, 1000);
<p>I'm the text</p>

Post a Comment for "How Can I Programmatically Trigger The Search Of My Browser?"