当前位置:网站首页>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 .
边栏推荐
- Apache+php+mysql environment construction is super detailed!!!
- Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
- Brief introduction of realsense d435i imaging principle
- [set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
- Simpleitk learning notes
- 大二困局(复盘)
- Troubleshooting of 32GB Jetson Orin SOM failure to brush
- Life is a process of continuous learning
- 中职网络子网划分例题解析
- Redhat7 system root user password cracking
猜你喜欢

3dslam with 16 line lidar and octomap
![[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation](/img/c2/991b8febd262cf9237017adc9d1221.jpg)
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation

Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Redis使用Lua脚本简介

Redhat7系统root用户密码破解
![[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation](/img/9b/a309607c037b0a18ff6b234a866f9f.jpg)
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation

Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning

MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)

为什么网站打开速度慢?

Deploy crawl detection network using tensorrt (I)
随机推荐
Apache+php+mysql environment construction is super detailed!!!
DEX net 2.0 for crawl detection
Qt读写Excel--QXlsx插入图表5
Redis encountered noauth authentication required
Niuke JS separator
【一起上水硕系列】Day 7 内容+Day8
Obtenir et surveiller les journaux du serveur distant
Kubernetes resource object introduction and common commands (V) - (configmap)
About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller
Final review (Day5)
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
QT read write excel -- qxlsx insert chart 5
[set theory] relational closure (relational closure related theorem)
Go practice -- generate and read QR codes in golang (skip2 / go QRcode and boombuilder / barcode)
redis 遇到 NOAUTH Authentication required
Configure DTD of XML file
Altaro VM backup getting started
Redis cannot connect remotely.
[trivia of two-dimensional array application] | [simple version] [detailed steps + code]
Pessimistic lock and optimistic lock of multithreading