How to configure search in your navbar (bootstrap)?

There is a code -

When you click on the search icon appears in search bar on top menu. Please tell me how to make the query and press search, this line remained with the entered (current) query, and is not discharged?
April 3rd 20 at 18:50
1 answer
April 3rd 20 at 18:52
Can zakamentuj call function closeSearch(), then the search bar will no longer disappear.
Yes, thank you! And do not tell me how to apply this code to search for
I add the tag attributes action="/search" method="get"
but nothing comes out - Monique7 commented on April 3rd 20 at 18:55
@Monique7, if you want to do without reloading the page then you will need to use the sending ajax request to the server, then the received data is displayed on the page. Correct me if I understood you correctly. - Monte.Rodriguez commented on April 3rd 20 at 18:58
No need it with a reboot, but after sending a query, this search string left filled. Also on this site...
5dfce9a4880d3189374187.png - Monique7 commented on April 3rd 20 at 19:01
// send word to the check, together with the results of the search back
 return ['result' => result, 'keywords' => keywords];

 // if is defined keywords: keywords, else: placeholder
 <input type="text" class="form-control" value=keywords placeholder="Search">
- wilhelm17 commented on April 3rd 20 at 19:04
I do not understand. Please help for a fee. - Monique7 commented on April 3rd 20 at 19:07

Find more questions by tags JavaScriptBootstrap