简体   繁体   English

当新内容出现在最小化页面上时,如何更新标签标题?

[英]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. 当您打开多个标签页时,某些网站将更新标签页标题(即,用“(1)”或“(2)”)来指示页面上的内容已更改。 I believe sites like Facebook and Buzzfeed do this (or am I just dreaming that they do that?)... How do they do it? 我相信Facebook和Buzzfeed之类的网站可以做到这一点(或者我只是在梦见他们这样做了?)...他们是如何做到的? Do they use JS? 他们使用JS吗? Is it possible to do something like that on a Wordpress site with a plugin that anyone is aware of? 是否可以使用任何人都知道的插件在Wordpress网站上执行类似的操作?

Just use: 只需使用:

document.title = "Whatever";

Reference: 参考:

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

相关问题 如何检查表中的新内容,然后更新浏览器选项卡标题? - How to check table for new content, and then update browser tab title? 切换到新标签页时,内容显示在当前标签页的div下面 - Content appears below the div of the current tab when switched to new tab 当标签处于活动/非活动状态时,如何让标签更改其标题? - How can I make an tab change it's title when it's active/inactive? 如何用空格设置 dojo 内容选项卡标题? - How can I set dojo content tab title with space? 在其他选项卡上时,如何定期更新网站标题? - How do I periodically update the title of a website when on a different tab? 在新窗口/标签页中打开链接后,如何向页面添加内容? - How can I add content to a page after opening the link in a new window/tab? 如何在不重新加载JSON更新页面的情况下更新div的类和内容 - How can i update div's class and content without reloading the page on JSON update 我是否可以操纵网页以避免打开新标签,并在同一标签中显示内容? - Can I manipulate a web page to avoid open a new tab, and display the content in the same tab? 如何更新ExtJS TabPanel中选项卡的内容? - How can I update the content of a tab in an ExtJS TabPanel? 打开新标签时如何设置标签标题? - How to set tab title when opening a new tab?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM