【问题标题】:Html5 notification(load particular div element to notification body)Html5 通知(将特定的 div 元素加载到通知正文)
【发布时间】:2018-05-10 19:43:11
【问题描述】:

我正在尝试使用 html5 通知,现在我正在努力将 html 元素加载到通知正文中

下面的代码我试过了

let string = document.getElementById('map')
let myNotification = new Notification('Incomming calls', {
                    body: string.innerHTML
                }).addEventListener('click',function(){
                    console.log('Notification clicked' + message)
                }) 

提前致谢

【问题讨论】:

    标签: html html5-notifications


    【解决方案1】:

    您可能想检查通知是否适用于您用作测试的浏览器,最好还是检查linkthis。 那么您需要更具体地说明问题是什么,是否有错误消息或您不喜欢的输出,以便我们更好地帮助您

    【讨论】:

    • 我的问题是需要在通知正文中加载 html 内容
    猜你喜欢
    • 2019-12-03
    • 1970-01-01
    • 1970-01-01
    • 2015-01-23
    • 1970-01-01
    • 2019-12-07
    • 2017-10-27
    • 1970-01-01
    • 2015-10-11
    相关资源
    最近更新 更多