SyntaxFix
Write A Post
Hire A Developer
Questions
Nowdays that's possible with native JS
var href = new URL('https://google.com?q=cats'); href.searchParams.set('q', 'dogs'); console.log(href.toString()); // https://google.com/?q=dogs