Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

update param in url jquery

var url = new URL('http://demourl.com/path?id=100');
var search_params = url.searchParams;

// add "topic" parameter
search_params.set('topic', 'main');

url.search = search_params.toString();

var new_url = url.toString();

// output : http://demourl.com/path?id=100&topic=main
console.log(new_url);
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get mat input value on keyup javascript 
Javascript :: how to add two elements in one path in react router v6 
Javascript :: get nearby store by latitude and longitude from my latitude and long node js 
Javascript :: printf statement in javascript 
Javascript :: react redirect to url 
Javascript :: gulp delete files 
Javascript :: jquery change picture onclick 
Javascript :: python object to json 
Javascript :: node js split data 
Javascript :: jQuery UI Sortable, then write order into a database 
Javascript :: javascript create script tag 
Javascript :: validate age javascript 
Javascript :: Javascript file in html angeben 
Javascript :: jquery datetimepicker example code 
Javascript :: drupal 8 get node from form 
Javascript :: load a page with ajax 
Javascript :: image onclick function react 
Javascript :: formdata to json 
Javascript :: vuejs string contains 
Javascript :: document.write multiple lines 
Javascript :: regular expression to find a string between two characters 
Javascript :: how to install nodejs on arch linux 
Javascript :: aos js 
Javascript :: how to add button in canvas html5 
Javascript :: js find in array and remove 
Javascript :: string remove accents 
Javascript :: eof while parsing 
Javascript :: attr hidden to show jquery 
Javascript :: how to check the last item in an array javascript 
Javascript :: Javscript Add days on Date 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =