![](/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.