惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 聂微东
MyScale Blog
MyScale Blog
The GitHub Blog
The GitHub Blog
C
Check Point Blog
M
MIT News - Artificial intelligence
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
D
Docker
Last Week in AI
Last Week in AI
IT之家
IT之家
F
Fortinet All Blogs
A
About on SuperTechFans
P
Proofpoint News Feed
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
博客园_首页
月光博客
月光博客
博客园 - 司徒正美
Y
Y Combinator Blog

博客园 - wenbo

启用 Sql Server 代理 radio 合并DataTable c#分页打印类 ASP.NET安全性 DataFormatString sql 随机数 alter table SQL数据库用户只有“名称”而无“登陆名”解决 override,new 如何用js控件div的滚动条,让它在内容更新时自动滚到底部? 获取当前地址 JS获取当前URL Javascript 操作select控件大全(新增、修改、删除、选中、清空、判断存在等) 获取下拉列表选中项的值和文本 c# c#分页样式 onperInit_onLoadComplete 清空日志 VS2005快捷键大全
location.href
wenbo · 2008-11-21 · via 博客园 - wenbo

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";
}