I'm creating a feature for a system and I came across the need to manipulate URL parameters, so I would like to know how to delete a certain parameter from the URL?
Here's a clearer example:
http://site.com.br?c=cliente&a=editar&id=31228
I need to remove the a=editar
parameter from the URL, I tried to do this:
var urlReplace = document.URL.replace('&a=editar','');
or
var urlReplace = document.URL.replace(/&a=editar/g,'');
However, neither form worked!