- html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <title>测试title>
- head>
-
- <body>
- <div style="font-size: 50px;">
- 🔔
- div>
- <script>
- let count = 0
- document.title = '您有新消息\u{1F514}'
- setInterval(() => {
- count++
- if (count % 2 === 0) {
- document.title = '您有新消息\u{1F514}'
- } else {
- document.title = '您有新消息'
- }
- }, 1000)
- script>
- body>
- html>

参考链接: