您需要使用jquery函数功能
<script>
var current_main = window.location.pathname;
var current= document.URL;
//var lastElement = current.substr(current.lastIndexOf(\'/\') + 1);
var main_url = currentq+"?"+thechosenone+"="+thechosenone;
var main = history.pushState(current,"", main_url );
</script>
通过使用它,您可以使用指定的get方法附加url。我希望这对你有帮助