<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>监控窗口是否活动</title>
</head>
<body>
    <script>
        window.addEventListener('blur', ()=>{
            document.title = '放入后台';
        }, true);

        window.addEventListener('focus', ()=>{
            document.title = '进入页面';
        }, true);
    </script>
</body>
</html>

 

相关文章:

  • 2021-11-29
  • 2021-12-13
  • 2021-11-27
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-28
  • 2021-12-10
相关资源
相似解决方案