I misunderstood the concept of history.length
The History.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
https://developer.mozilla.org/en-US/docs/Web/API/History/length
According to the concept , If you click back
button then go forward again. the history.length would not change, because history.length is the number of elements in the session history.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.