Location 对象包含有关当前 URL 的信息
通过hash来更改url
location.hash = "newhash"
history对象,用来保存浏览历史
通过pushState()来更改url
history.pushState({},'',home.html)
通过replaceState()来更改url
history.replaceState({},'',home.html)
退后
history.back()
//等价于
history.go(-1)
前进
history.forward()
//等价于
history.go(1)
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- awee.cn 版权所有 湘ICP备2023022495号-5
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务