当前位置:网站首页>Browser listens for tab closing
Browser listens for tab closing
2022-08-03 04:02:00 【Ashu Ashu】
Search for this question before and the answer is usually
window.onbeforeunload = function (e) {console.log('beforeunload')return 1;//Return whatever you want};
But when I use it myself, I refresh or click the x of the tag to close it, and the prompt will still not pop up. Later, I found that I need to interact with the current interface to realize the function of closing the tab for prompting.Even the simplest click of an interface counts as interaction.
Hehehehehehe...fuck!
边栏推荐
猜你喜欢
【动态规划--01背包】HJ16 购物单
Dialog manager in the fourth chapter: the dialog message loop
金仓数据库 MySQL 至 KingbaseES 迁移最佳实践(3. MySQL 数据库移植实战)
2022中国五金制品行业发展前景分析
关于#sql#的问题,如何解决?
"Obs" start pushing flow failure: the Output. The StartStreamFailed call process
(2022杭电多校五)1010-Bragging Dice (思维)
【leetcode热题Hot100】——LRU缓存
v-text指令:设置标签内容
【STM32】入门(三):按键使用-GPIO端口输出控制
随机推荐
多线程使用哈希表
肖sir___面试就业课程____app
Mysql如何建立索引实现语句优化
Dynamically modify the title of the navigation bar in uniapp
自考六级雅思托福备战之路
单元测试是什么?怎么写?主要测试什么?
数字3d虚拟交互展厅顺应时代发展需求和趋势
【leetcode热题Hot100】——任务调度器
浏览器监听标签页关闭
SkiaSharp 之 WPF 自绘 五环弹动球(案例版)
conda常用命令合集
金仓数据库 Pro*C 迁移指南(3. KingbaseES Pr*oc 对 Oracle Pro*c 的兼容)
【笔记】混淆矩阵和ROC曲线
Auto. Js scripts run time calculated Pro
金仓数据库 Pro*C 迁移指南( 4. KingbaseES 的 Pro*C 迁移指南)
How to write test cases in software testing technology (2)
金仓数据库 OCCI 迁移指南(5. 程序开发示例)
移植RT-Thread编译报错thumb conditional instruction should be in IT block
富瑞宣布战略交易,以简化运营,持续专注于打造领先的独立全服务型全球投行公司
银微转债,洁特转债上市价格预测