简体   繁体   中英

How can I update a tab's title when new content appears on minimized page?

When you have multiple tabs open some websites will update the tab title (ie with a "(1)" or "(2)") to indicate that content on the page has changed. I believe sites like Facebook and Buzzfeed do this (or am I just dreaming that they do that?)... How do they do it? Do they use JS? Is it possible to do something like that on a Wordpress site with a plugin that anyone is aware of?

Just use:

document.title = "Whatever";

Reference:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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