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

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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes ? Yes ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes Yes ? Yes ? ? ?

See also

  • The History interface it belongs to.

文档标签和贡献者

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