Search demo

The javascript/css code in this HTML file is to demonstrate a way of searching inside the HTML for entries matching the search words.

This code acts on a defined class which stores the keywords to be searched for.

Search capabilities include:

  • "Or" (default) return en element if one search word is found in its keywords list
  • "And" return en element if all the search words are found in its keywords list
  • "Whole words". By default any part of a keyword matching a search word is returned. Enabling this option dictates that the seach word must match an entire keyword to be returned.
  • A search word prefixed with a + must be present in the keywords list for that element to be returned.
  • A search word, prefixed with a -, found in the keywords list for an element does not return this element, even if other search words are in the keywords list.

Limitations: no approximate words, no ranking.

 

Demo

Enter words in the search field. Select an option (Or, And, Whole words) and click the search icon ( ).

 



Use the search bar to find what you are looking for!!  -  Type * in the search bar to display all entries.
You can use the + or - prefixes to oblige word(s) to be present or exlude them, respectively, from the search.