Is it possible to delete a GET variable with Javascript?
I have a dynamic search form and when I send a query it remains the values of the query in GET variables.
Now, I have a custom reset button too, 开发者_C百科that clear the fields, but with surprise I note that the new queries mantains the GET values and carry bad results.
Thanks for help.
i assume that you are having problems because get values stay in the url. so you can use
history.pushState(stateObj, "", ('http://localhost/'));
by replacing the localhost with your page link
Set the form's action
attribute to a URL without parameters.
精彩评论