Skip to content
Advertisement

How can I add or update a query string parameter?

With javascript how can I add a query string parameter to the url if not present or if it present, update the current value? I am using jquery for my client side development.

Advertisement

Answer

I wrote the following function which accomplishes what I want to achieve:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement