简体   繁体   English

更改非活动页面'标题'

[英]Change inactive page 'Title'

I influenced from StackOverflow Chat . 我受StackOverflow Chat的影响。
Here when the page is inactive then number of the new incoming chat messages are displayed in the Page title. 此处当页面处于非活动状态时,页面标题中将显示新的传入聊天消息的数量。 When the page is activated the this number is disappeared. 激活页面后,该数字消失。 How can I implement this concept in my application? 如何在我的应用程序中实现这个概念? I also want to highlight that window. 我也想突出显示该窗口。

detecting when it goes inactive can be done with 'window.onblur' (the onblur event) 可以使用“ window.onblur”( onblur事件)检测何时不活动

detecting when it goes active again can be done with 'window.onfocus' (the onfocus event) 可以使用“ window.onfocus”( onfocus事件)来检测何时再次激活

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM