showing results for - "how to delete a parameter with js"
Lilli
03 Jan 2021
1// Remove all Parameters
2var url = new URL('http://demourl.com/path?topic=main');
3// set search property to blank
4url.search = '';
5var new_url = url.toString();
6// output : http://demourl.com/path
7console.log(new_url);
Arianna
28 Feb 2018
1// Delete a Parameter by Name
2search_params.delete('id');