属性 | 描述 |
---|---|
length | 返回浏览器历史列表中的 URL 数量。 |
但是其实英文解释是:
The History.length read-only property returns an integer representing the number of elements in the session history, including the currently loaded page. For example, for a page loaded in a new tab this property returns 1.
核心是这一句:
the number of elements in the session history
是session的历史URL个数