Javascript历史记录-如果没有,去index.html

Javascript history go — if not, go to index.html

本文关键字:index html 如果没有 历史 记录 Javascript      更新时间:2023-09-26

返回相应的tumblr页面,我们使用:

<a href="javascript:history.go(-1)"> Back </a>

然而,我们直接从twitter应用程序获得了大量流量,这使该功能无法工作。有没有办法让历史。Go不工作(或带您离开网站),它只会带您到index.html?

这是历史按钮所在的页面之一:http://lexican.info/post/49265445109/sesquipedalophobia

谢谢你的帮助。

遗憾的是,我不认为这是可能的,因为帖子页面的索引之间没有关系。

尝试使用history.length:

检查历史列表中有多少页http://www.w3schools.com/jsref/prop_his_length.asp