js去除浏览器地址后面的所有参数
解决方法:
现在把?号后面的删除去掉
var url = window.location.href;
if (url.indexOf("?") != -1) {
url = url.replace(/(\?|#)[^'"]*/, '');
window.history.pushState({}, 0, url);
}
向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
js去除浏览器地址后面的所有参数
解决方法:
现在把?号后面的删除去掉
var url = window.location.href;
if (url.indexOf("?") != -1) {
url = url.replace(/(\?|#)[^'"]*/, '');
window.history.pushState({}, 0, url);
}
有建议,请留言!