zoukankan      html  css  js  c++  java
  • JavaScript浏览器历史的语法小问题

    https://www.w3schools.com/jsref/met_his_back.asp
    This is the same as clicking the "Back button" in your browser, or history.go(-1).
    go(-1); <-> back();
    道理也简单:go是跳转到到指定页,正负数决定向前向后,back是后退一步。

    不写window就是默认window,
    histor.go(-1); <-> window.history.go(-1);
    道理也简单:类似于java里不写this就是this。走了,缺省就是我,我走了。
     
    http://www.runoob.com/jsref/obj-window.html
    self 返回对当前窗口的引用。等价于 window 属性。
    self.history; <-> window.history;

    综上所述:history.go(-1); <-> self.history.back();
     
    意外收获:
    1.selt和window都是new Window。
    2.frames是new Array(),因为是数组,所以会有多个frame。
  • 相关阅读:
    Hashmap实现原理
    策略模式
    Google Drive ubuntu
    numix Docky
    Google Drive 和 Dropbox 同步同一个文件夹目录
    sublime text 2
    matlab cell
    liteide
    taglist and nerdtree
    codeblocks
  • 原文地址:https://www.cnblogs.com/rgqancy/p/6837222.html
Copyright © 2011-2022 走看看