JavaScript detect leaving page

前端 未结 0 1368
盖世英雄少女心
盖世英雄少女心 2021-02-03 12:39

I need a way (some event(s)) to detect when user leaves current page. By "leaves" I mean he switched to another application/tab. I have tried visibilitychange

相关标签:
回答
  • 消灭零回复
提交回复
热议问题