window.history.back();//后退 window.history.forward();//前进 window.history.go(-1);//移动到指定记录点,当前倒退1,相当于window.history.forward()window.history.length//可以了解历史中有多少个记录点
以上只是查资料时候的附带
下面来说
history.pushState与history.replaceStatehistory.pushState会增加一条历史记录,history.replaceState会替换而不会增加,所以会更舒适一点
r
HTML5无刷新改变当前url
最新推荐文章于 2025-04-20 08:03:01 发布