history

2017-04-20  本文已影响0人  洛洛kkkkkk
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            
        </style>
    </head>
    <body>
        <a href="history2.html">dasdsa</a>
    </body>
    <script type="text/javascript">
        //history
//      console.log(window.history);
//      history.back();
//      setTimeout(function () {
//          history.forward();
//      },2000)

//      history代表了房钱页面的历史记录,这个记录浏览器的记录不一样.代表了只有当前页面跳转过的页面.
//      length属性代表了当前历史记录中的个数
//      三个方法.
//      back forward go
//      back() 返回上一页
//      forward()去下一页
//      go()去某一个页面,go(-2) 代表2次back()
        setTimeout(function () {
            window.open("history2.html","_self",false);
        },2000)
        
    </script>
</html>
上一篇 下一篇

猜你喜欢

热点阅读