In the address bar insert GET parameters?

Hello, I have a page with a filter and to save the data in the filter I want to record them in the get parameters, how it can be implemented?
June 7th 19 at 15:45
1 answer
June 7th 19 at 15:47
Solution
window.location.search = "?filter=cars"
You can do to avoid reloading the page? - Izaiah32 commented on June 7th 19 at 15:50
var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + "?filter=cars";
window.history.the pushState({path:newurl}, "", newurl);
- Desiree.Fad commented on June 7th 19 at 15:53
Thank you. - Izaiah32 commented on June 7th 19 at 15:56

Find more questions by tags JavaScriptjQuery