js 网址修改,页面不变的

            var currenturl = window.location.href;

            var newUrl = (currenturl.split("?"))[0];

            console.log(newUrl);

            history.pushState('','',newUrl+'/abcd/sdfsdf?profile=123');//前两个参数可省略

猜你喜欢

转载自blog.csdn.net/nanshan_hzq/article/details/110482291