JavaScript 获取浏览器特定历史对象
有很多关于 Javascript 和浏览器的历史对象的文章。但我在任何地方都找不到任何有用的内容。
我怎样才能获得特定的历史对象,假设我需要第 30 个历史对象。我怎么得到它?
例如,我有一个获取历史记录的代码
var hlist = window.history.length;
for(i=hlist;i<=40;i++){
////???????
}
,如何获取循环内每个历史记录的 url?
There are lots of articles on Javascript and Browser's history object. But I cant find any useful content anywhere.
How can I get a specific history object, lets say I need 30th history object. How I get it?
for example I have a code to get history
var hlist = window.history.length;
for(i=hlist;i<=40;i++){
////???????
}
How I get url of each history within the loop?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
出于隐私原因,历史对象受到保护。您可以前进、后退到 X 号,但您无法获取有关其实际包含内容的信息。
For privacy reasons the history object is protected. YOu can go forward, go backward got to X number, but you are not allowed to get information on what it actually contains.