Histroy 历史记录

语法:hist.back()

功能:回到历史记录的上一步

说明:相当于使用了history.go(-1)

 <a href="返回3.html">去往页面3</a>
    <input type="button" name="" id="t3" value="返回页面1">
    <script>
        var b=document.getElementById("t3") //可以在本地创建3个试试看  如果要跳转要在第三个页面跳回第一个可以适应 history.go(-2)
        b.onclick=function(){
            history.back();
        }
    </script>

猜你喜欢

转载自www.cnblogs.com/ckxbk/p/12902681.html