谷歌double click:如何利用javascript实现后退到前几个页面

来源:百度文库 编辑:中科新闻网 时间:2024/04/27 15:00:21

<script language=javascript>
history.go(N)
</script>
N为正数时前进N页,N为负数是后退N页
比如history.go(-1)后退一页,history.go(1)前进一页

history.go(-1):返回到前一页
history.go(-n):返回到前n页

建个超连接:
<a href=\"javascript:window.history.go(-1)\">返回</a>

<a href="javascript:history.go(-1)">回退1步</a>
<a href="javascript:history.go(-2)">回退2步</a>
<a href="javascript:history.go(-3)">回退3步</a>
<a href="javascript:history.go(-4)">回退4步</a>
<a href="javascript:history.go(-5)">回退5步</a>
<a href="javascript:history.go(-6)">回退6步</a>
<a href="javascript:history.go(-7)">回退7步</a>
<a href="javascript:history.go(-8)">回退8步</a>
<a href="javascript:history.go(-9)">回退9步</a>
<a href="javascript:history.go(-10)">回退10步</a>