- history.length
- history.go()
- history.go(1)
前进一页 - history.go(2)
前进两页 - history.go(-1)
后退一页 - history.go(-2)
后退两页
- history.go(1)
- history.forward()
前进一页 - history.back()
后退一页
共经历了三个页面,所以history.length
的值是3
。
- history.state
- history.pushState()
history.pushState(state,title,url)
,更改URL,但不会加载该URL指向的页面。
- history.replaceState()
history.replaceState(state,title,url)
,更改URL,但不会加载该URL指向的页面。
window.history
最新推荐文章于 2024-01-08 23:22:08 发布