Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js push param to url

function setQueryStringParameter(name, value) {
    const params = new URLSearchParams(window.location.search);
    params.set(name, value);
    window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`));
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: YT.Player is not a constructor 
Javascript :: set value input date javascript 
Javascript :: change image src jquery 
Javascript :: nodejs print variable in string 
Javascript :: getype js 
Javascript :: console.log color 
Javascript :: confirm before leaving page javascript 
Javascript :: get moment date without time 
Javascript :: javascript center text 
Javascript :: Sorting an array of objects on both ascending and descending order on same click 
Javascript :: jquery call dynamically created class 
Javascript :: insert value to html input with javascript variable 
Javascript :: moment js cdn 
Javascript :: javascript convert to two decimal places 
Javascript :: bootstrab close modal 
Javascript :: loop through object element names javascript 
Javascript :: how to select second element in jquery 
Javascript :: react router catch all 404 
Javascript :: javascript is object array 
Javascript :: get window resolution javascript 
Javascript :: how to hide all fo the paragraphs in jquery 
Javascript :: protractor element.all for each 
Javascript :: console log jquery 
Javascript :: javascript iterate through object properties 
Javascript :: jquery get element by id from variable 
Javascript :: angular 10 get unique values from array of objects 
Javascript :: define keyframes with javascript 
Javascript :: phone number validation regex 
Javascript :: new date with date + 1 
Javascript :: node js check if a user exists in mysql 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =