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 :: find difference in array of objects javascript 
Javascript :: document.getelementsbytagname 
Javascript :: stripe npm 
Javascript :: // Write a function that takes two strings (a and b) as arguments // If a contains b, append b to the beginning of a // If not, append it to the end // Return the concatenation 
Javascript :: gettype js 
Javascript :: how to implement toastr 
Javascript :: get value of datalist javascript 
Javascript :: react-native-checkbox in a loop 
Javascript :: legacy react start 
Javascript :: javascript parse and validate json 
Javascript :: jQuery select immediate children 
Javascript :: how to disable mouse right click in html page 
Javascript :: faker npm 
Javascript :: array of characters to stirng javascript 
Javascript :: how to swap two elements in an array js 
Javascript :: vanilla tilt.js 
Javascript :: mask date of birth/ dob in javascript 
Javascript :: how to get only month and year in js 
Javascript :: value is array 
Javascript :: csrf token ajax header 
Javascript :: event listener for element lost focus 
Javascript :: current height minus px 
Javascript :: how to pass an object directly to formdata in javascript 
Javascript :: javascript loop over class 
Javascript :: how to check if a string is correctly encoded as base64 in javascript 
Javascript :: how to set background automatically with my screen height 
Javascript :: how to add sticky function in javascript 
Javascript :: nodejs increase heap size 
Javascript :: remove all classes jquery 
Javascript :: jquery scroll when object appear on screen make animation 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =