Javascript 如何获取通知块的ID并关闭它们?
我有一些通知出现在屏幕的角落,它们是使用JS生成的。可以有多个相互堆叠的通知。我不知道如何关闭它们 函数类型、消息{ =>{ var n=document.createElementdiv; var id=Math.random.toString 36.substr2,10; n、 setAttributeid,id; n、 classList.addnotification,类型; n、 classList.addfade_out; n、 innerHTML=消息; document.getElementByIdnotification-area.appendChildn; 设置超时=>{ var notifications=document.getElementByIdnotification-area.getelementsbyclassname通知;Javascript 如何获取通知块的ID并关闭它们?,javascript,Javascript,我有一些通知出现在屏幕的角落,它们是使用JS生成的。可以有多个相互堆叠的通知。我不知道如何关闭它们 函数类型、消息{ =>{ var n=document.createElementdiv; var id=Math.random.toString 36.substr2,10; n、 setAttributeid,id; n、 classList.addnotification,类型; n、 classList.addfade_out; n、 innerHTML=消息; document.get
forvar i=0;我投票决定结束这个问题,因为它是一个只使用英语的网站。这个问题更适合你。