if (!message.touser) { $("#sound").attr('src', "https://taibao-image.ecdpower.net/shtlc/chat/msg.mp3"); Notification.requestPermission(function (permission) { var notification = new Notification("最新消息", { body: message.content, icon: '', dir: 'auto' }); setTimeout(function () { notification.close();//关闭桌面通知 }, 5000); }) } return;
new Notification 桌面 通知
猜你喜欢
转载自www.cnblogs.com/lpp-11-15/p/13198441.html
今日推荐
周排行