Add In-Page Search to Your Web Page
= Highlight Matched Text =
- Using the keyboard shortcut "Ctrl + F" or "⌘ command + F" typically searches all text on a page, including ads. However, this program limits the search to a specific section designated by the <div id="content_to_search"></div> tag.
- Once a search term is entered, the matched text is highlighted, and the page scrolls to its location.
- Since the search can be executed with just the "Enter" key, there's no need to include a "Search Button."
- If multiple search results are found, you can navigate through them sequentially using the "Enter" key.
- Copy the CSS, JavaScript, and HTML code below to add this feature to your own page.
- Feel free to modify the code to suit your page design.
- You can copy and use this code freely.
- There are no restrictions on its use. Feel free to modify it to suit your own page.
スポンサーリンク
スポンサーリンク
おすすめサイト・関連サイト…
スポンサーリンク