📅  最后修改于: 2022-03-11 15:03:14.278000             🧑  作者: Mango
const url = new URL(window.location.href);
url.searchParams.set('param1', 'val1');
url.searchParams.delete('param2');
window.history.replaceState(null, null, url); // or pushState