js jquery方法汇总
1、调用函数删除所有参数
function removeUrlAllParameters() {
var url = new URL(window.location.href);
url.search = ''; // 清空所有查询参数
window.history.pushState(null, null, url.href);
}
// 调用函数删除所有参数
removeUrlAllParameters();
1、调用函数删除所有参数
function removeUrlAllParameters() {
var url = new URL(window.location.href);
url.search = ''; // 清空所有查询参数
window.history.pushState(null, null, url.href);
}
// 调用函数删除所有参数
removeUrlAllParameters();