I have created a website and have added a button and lot of text. What I want is to use the browser search (Ctrl+F), when I press the button which I added in website.
How can I achieve this?
It kind of works for FF. See this page
<a href="#" onclick="find();">Find in This Page...</a>
update: from mark's comment:
From my testing
window.find()is supported in Chrome 37, and FF31, but not IE11
for more information on this window.find go here
No. In general, you cannot invoke browser controls from inside the webpage - security, sandboxing, and all that.
You need to make some sort of in-page search - if you're using a CMS, most of them have a simple search feature built-in.
©2020 All rights reserved.