当前位置:网站首页>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!
边栏推荐
猜你喜欢

ClickHouse—高级

【动态规划--01背包】HJ16 购物单

【无标题】2022-7-24

种草一个让程序员男友编程时,记住一辈子的 IDEA 神仙插件!

Best Practices for Migration from Jincang Database from MySQL to KingbaseES (3. MySQL Database Migration Practice)

IDEC和泉触摸屏维修HG2F-SS22V HG4F软件通信分析

DC-5靶场下载及渗透实战详细过程(DC靶场系列)

js Fetch返回数据res.json()报错问题

直播|StarRocks 技术内幕 :低基数全局字典优化

v-on指令:为元素绑定事件
随机推荐
ORACLE中文乱码
【STM32】入门(三):按键使用-GPIO端口输出控制
leetcode刷题学习之路
工程水文学试题库
SMP 需要考虑的事情
Compose the displacement of the view
金仓数据库 Pro*C 迁移指南( 4. KingbaseES 的 Pro*C 迁移指南)
解析,强势供应商的管理方法
基于WPF重复造轮子,写一款数据库文档管理工具(一)
9 椭圆曲线密码体制
shell之条件语句(条件测试、if语句,case语句)
我将GuiLite移植到了STM32F4开发板上
网工知识角|华为网络工程师,华为、华三、思科设备三层交换机如何使用三层接口?命令敲起来
【笔记】混淆矩阵和ROC曲线
ClickHouse删除表
Linux-Docker-Redis安装
ESP8266-Arduino编程实例-MCP3008-ADC转换器驱动
Jincang Database OCCI Migration Guide (5. Program Development Example)
MediaRecorder录制屏幕时在部分机型上报错prepare failed:-22
正则表达式绕过