How to make such a search?

There is a website https://agrocat.ru/search/
They have a search made extremely comfortable, introduce the article and get immediately a list of items and selecting an item doesn't open a new page and displays the same on all ..just below
March 23rd 20 at 19:17
1 answer
March 23rd 20 at 19:19
Hi, using Jquery.
<input type="text" name="search" id="search" />
$('#search').keyup(function(){
$.ajax({
url: "...", // Address of handler
data: $(this).serialize(), 
success: function(e){
// The action that will occur
}
})
});

In the handler, you need to do a DB query and display or HTML, to the result, or JSON, if we are talking about REST. :)
And don't forget the throttle, otherwise the request is sent for every character entered. - kamille.Bergstrom commented on March 23rd 20 at 19:22

Find more questions by tags Web Development