这篇翻译不完整。请帮忙从英语翻译这篇文章

History.length是一个只读属性,返回当前session中的history个数,包含当前页面在内。举个例子,对于新开一个tab加载的页面当前属性返回值1。

 

Syntax

 

length = history.length;

Examples

var result = window.history.length; // 返回当前session中的history个数

Specifications

Specification Status Comment
HTML Living Standard
History.length
Living Standard No change from HTML5.
HTML5
History.length
Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox Full support YesIE ? Opera ? Safari ? WebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

See also

  • The History interface it belongs to.

文档标签和贡献者

此页面的贡献者: poppyLuo
最后编辑者: poppyLuo,