zoukankan      html  css  js  c++  java
  • location.href

    self.location.href="/url"       当前页面打开新页面,与默认的location.href 或者是windows.location.href 或者是 this.location.href 效果一样

    parent.location.href="/url" 在父页面打开新页面

    top.location.href="/url"       在顶层页面打开新页面

    top.location.href="/url"
    说的是在顶层页面打开url
    self.location.href="/url"
    说的是仅本页面打开url地址
    parent.location.href="/url"
    说的是你窗口打开Url地址

    应该还有一个this.location.href="/url"
    用法和self的用法一致

    还有就是如果页面当中有自定义的frame的话,
    也可以将parent  self   top换为自定义frame的名称
    效果就是在自定义frame窗口打开url地址

    if(window != top){
       top.location.href="/login.aspx";
    }

    打开新窗口

    window.open('url','_blank')

    Dim str As String = "window.open('http:','_blank');"

    Me.album.Attributes.Add("onclick", str.Replace("http:", row("相册地址").ToString.Trim))

  • 相关阅读:
    从进入这里,没有写过什么文章,现在开始吧
    24)
    23)
    22)
    21)
    20)
    19)
    18)
    17)
    16)
  • 原文地址:https://www.cnblogs.com/zqonline/p/1439954.html
Copyright © 2011-2022 走看看