📌  相关文章
📜  js 设置查询参数而不重新加载 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:51.686000             🧑  作者: Mango

代码示例2
if (history.pushState) {
    var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?myNewUrlQuery=1';
    window.history.pushState({path:newurl},'',newurl);
}