当前位置:网站首页>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!
边栏推荐
猜你喜欢
随机推荐
中非合作论坛非洲产品电商推广季启动 外交部:推动中非合作转型升级
How to write test cases in software testing technology (2)
DC-4靶场搭建及渗透实战详细过程(DC靶场系列)
v-on指令:为元素绑定事件
ClickHouse - Getting Started
钢铁电商行业方案:钢铁工业产品全生命周期管理解决方案
conda常用命令合集
Have bosses know date field flinksql is synchronized to the use of the null on how to deal with
浏览器监听标签页关闭
正则表达式绕过
高等代数_笔记_配方法标准化二次型
硬件设计哪些事-PCB设计那些事
软件测试技术之如何编写测试用例(2)
肖sir__简历
正则表达式与绕过案例
WinForm(二):WinFrom中Main函数的入参和出参
path development介绍
找不到符号@SuperBuilder,你以为真的是Lombok的问题?
对话框管理器第四章:对话框消息循环
Auto. Js scripts run time calculated Pro









