📅  最后修改于: 2022-03-11 15:01:40.856000             🧑  作者: Mango
function setQueryStringParameter(name, value) {
const params = new URLSearchParams(window.location.search);
params.set(name, value);
window.history.replaceState({}, "", decodeURIComponent(`${window.location.pathname}?${params}`));
}