扫码关注官方订阅号
Chrome 有一个特性就是具备了“桌面通知”功能,我想在自己的站点加上这个功能。有没有相关的示例代码(javascript)和开发资料呢?
Gmail 在收到新的聊天讯息或电子邮件时在桌面上显示弹出式窗口通知:
ringa_lee
主要是用到了 Webkit 的提供的 APIwindow.webkitNotifications.createNotification 这里有几个简单的示例:http://www.html5rocks.com/en/tutorial...http://beakkon.com/tutorial/html5/des...http://0xfe.blogspot.com/2010/04/desk... 还有 Chromium 官方的 API 说明书:http://www.chromium.org/developers/de...
window.webkitNotifications.createNotification
desktop notification —— google 一下你就知道 :)
第一个答案过时,详见http://stackoverflow.com/questions/2271156/chrome-desktop-notification-example
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
主要是用到了 Webkit 的提供的 API
window.webkitNotifications.createNotification
这里有几个简单的示例:
http://www.html5rocks.com/en/tutorial...
http://beakkon.com/tutorial/html5/des...
http://0xfe.blogspot.com/2010/04/desk...
还有 Chromium 官方的 API 说明书:
http://www.chromium.org/developers/de...
desktop notification —— google 一下你就知道 :)
第一个答案过时,详见http://stackoverflow.com/questions/2271156/chrome-desktop-notification-example