How to display what i searched in the search box after getting result…eg: if searched for apple in a search box after getting result how to display the apple in the search box
How to display what i searched in the search box after getting result
How to display what i searched in the search box after getting result…eg: if searched for apple in a search box after getting result how to display the apple in the search box
How to display what i searched in the search box after getting result
2
Answers
Get the value of the search box:
Display the search term in the search box:
You can place this in the func that displays the search results. Then it updates the search box with the search term after displaying the results.
You can use localStorage element in your code to store the current textbox value. It will stay until you remove it. For Example,
and js part is,
You need jQuery in your code to run this code.
Hope this will help you.