当前位置:网站首页>location.href用法
location.href用法
2022-08-09 08:56:00 【l8487】
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";
}
边栏推荐
猜你喜欢
随机推荐
Three handshakes, four waves
RESTful
canvas 文字垂直居中
Introduction to Network Layer Protocols
leetcode 32. 最长有效括号 (困难)
Getting started with ctfshow-web Part of the file upload part solution
jdbctemplate connects to sql server, the data found in the code is inconsistent with the database, how to solve it?
【Harmony OS】【ARK UI】公共事件模块
js实现看板全屏功能
Literature retrieval operation code
The MySQL database
STM32 如何知道FLASH的使用情况
gin中简单的curd接口例子
腾讯云服务器修改为root登录安装宝塔面板
6000 字+,帮你搞懂互联网架构演变历程!
nyoj58 最少步数(DFS)
parse <compoN> error: Custom Component‘name should be form of my-component, not myComponent or MyCom
nodeMCU(ESP8266)和RC522的接线图
Some of the topics in VNCTF2021 are reproduced
leetcode 37. 解数独 (困难)