zoukankan      html  css  js  c++  java
  • BOM之其他浏览器对象的使用

    BOM History
    History 对象包含用户(在浏览器窗口中)访问过的 URL
    back()  加载 history 列表中的前一个 URL
    forward()  加载 history 列表中的下一个 URL
    go()  加载 history 列表中的某个具体页面

    <!--
    BOM Navigater
    BOM Screen
    BOM History
    BOM Location
    -->
    <script type="text/javascript">
            document.write(navigator.platform+","+navigator.systemLanguage+","+navigator.cpuClass+"<br/>");
            document.write(screen.height+","+screen.width+"<br/>");

            function next(){
                    //history.forward();
                    history.go(1);   //后退-1;
            }
            function previous(){  //要事先写个跳转页面到这个页面
                    history.back();
            }
            document.write(location.href+"----"+location.protocol+"<br/>");
    </script>
    <input type="button" onclick="next()" value="前进">
    <input type="button" onclick="previous()" value="后退">
    <a href="http://www.baidu.com">百度</a>















  • 相关阅读:
    [转]tesseract api C++使用例子
    Flyway记录
    线程安全性和共享
    并发初解
    生产环境中遇到过什么问题?或者有没有自己解决什么问题比较自豪的
    Java白皮书关键词理解【随记】
    技术面试记录
    Mac下完全卸载IntelliJIdea
    docker提交镜像后运行新容器mysql无法启动
    IntelliJ IDEA切换SDK解决卡顿的问题
  • 原文地址:https://www.cnblogs.com/meihao1203/p/9176064.html
Copyright © 2011-2022 走看看