向当前url添加参数

//向当前url添加参数,没有历史记录window.history.replaceState({path: newurl}, '', newurl);func
 //向当前url添加参数,没有历史记录window.history.replaceState({path: newurl}, '', newurl);function updateQueryStringParameter(uri, key, value) {if (!value) {return uri;}var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");var separator = uri.indexOf('?') !== -1 ? "&" : "?";if (uri.match(re)) {return uri.replace(re, '$1' + key + "=" + value + '$2');} else {return uri + separator + key + "=" + value;}}