document.addEventListener('visibilitychange', function () {
    if (document.visibilityState == 'hidden') {
        normal_title = document.title;
        document.title = '客官请留步...';
    } else document.title = normal_title;
});

离开前:

离开(切换)当前页面时改变页面title

离开后:

离开(切换)当前页面时改变页面title

相关文章:

  • 2021-07-19
  • 2022-02-08
  • 2022-12-23
  • 2022-01-09
  • 2022-01-23
  • 2022-12-23
  • 2021-11-02
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2021-08-07
相关资源
相似解决方案