zoukankan      html  css  js  c++  java
  • JavaScript history属性

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    </head>
    <body>

    <input type="button" value="前进" onclick="func1();">
    <input type="button" value="后退" onclick="func2();">
    <a href="history_lesson2.html">lesson</a>

    <script>
    function func1() {
    //history.forward();
    history.go(2);
    }
    // history内部三种方法:forward back go 一个属性:length

    function func2() {
    //history.back();
    history.go(-1);
    alert(history.length);
    }

    </script>
    </body>
    </html>

  • 相关阅读:
    大于00
    today
    10
    面试题flask
    开发者日志
    7月22日一天学的东西
    资料
    3333
    2222
    1
  • 原文地址:https://www.cnblogs.com/gerenboke/p/11767383.html
Copyright © 2011-2022 走看看