当前位置:网站首页>JS implements the problem of closing the current child window and refreshing the parent window
JS implements the problem of closing the current child window and refreshing the parent window
2022-07-03 05:44:00 【k678mh】
Add in child window :
<script type="text/javascript">
window.onunload = onbeforeunload_handler;
function onbeforeunload_handler(){
window.opener.location.href = window.opener.location.href;
}
</script>
attach :
onbeforeunload and onunload difference :
onbeforeunload It is also called when the page is refreshed or closed ,onbeforeunload It is called when you are about to go to the server to read a new page , Reading has not started yet ; and onunload The new page to be loaded has been read from the server , Called when the current page is about to be replaced .onunload You can't prevent the update and closing of the page . and onbeforeunload It can be done .
边栏推荐
- chromedriver对应版本下载
- 牛客网 JS 分隔符
- redis 遇到 NOAUTH Authentication required
- @Import annotation: four ways to import configuration classes & source code analysis
- 配置xml文件的dtd
- [advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
- DEX net 2.0 for crawl detection
- Exception when introducing redistemplate: noclassdeffounderror: com/fasterxml/jackson/core/jsonprocessingexception
- Pessimistic lock and optimistic lock of multithreading
- Pytorch through load_ state_ Dict load weight
猜你喜欢

Analysis of the example of network subnet division in secondary vocational school
![[minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]](/img/b0/aa5dce0bb60c50eea907de9e127d6c.jpg)
[minesweeping of two-dimensional array application] | [simple version] [detailed steps + code]

求质数的方法

Export the altaro event log to a text file

Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)

今天很多 CTO 都是被干掉的,因为他没有成就业务

期末复习(Day5)

Simpleitk learning notes

2022.DAY592

Apache+php+mysql environment construction is super detailed!!!
随机推荐
Can altaro back up Microsoft teams?
聊聊如何利用p6spy进行sql监控
Redis使用Lua脚本简介
Understand one-way hash function
DEX net 2.0 for crawl detection
2022.7.2day594
2022.7.2 simulation match
EMD distance - example of use
2022.DAY592
[advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer
SimpleITK学习笔记
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
中职网络子网划分例题解析
Final review (Day7)
Why should we rewrite hashcode when we rewrite the equals method?
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
一起上水碩系列】Day 9
Jetson AgX Orin platform porting ar0233 gw5200 max9295 camera driver
Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning
redis 遇到 NOAUTH Authentication required