![](/img/trans.png)
[英]After pressing back and calling history.back(); History.pushstate isn't instantiated / not working
[英]After history.back() , hisytory.pushState does not increment history length
我误解了history.length
的概念
History.length 只读属性返回一个整数,表示会话历史记录中的元素数量,包括当前加载的页面。
https://developer.mozilla.org/en-US/docs/Web/API/History/length
根据概念,如果单击back
按钮,则再次前进。 history.length 不会改变,因为 history.length 是会话历史中元素的数量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.