Answers for "how to delete a parameter with js"

0

how to delete a parameter with js

// Remove all Parameters
var url = new URL('http://demourl.com/path?topic=main');
// set search property to blank
url.search = '';
var new_url = url.toString();
// output : http://demourl.com/path
console.log(new_url);
Posted by: Guest on August-26-2021
0

how to delete a parameter with js

// Delete a Parameter by Name
search_params.delete('id');
Posted by: Guest on August-26-2021

Code answers related to "how to delete a parameter with js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language