调查员 发表于 3 天前

这个是怎么做到的?能在系统中显示通知?

我只是在浏览器中打开这个网站,它却能在我win11系统中显示通知。。。<br />
<br />
<br />
<img id="aimg_m8G8Z" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="http://tu.881155.xyz/i/2025/04/28/680ec6a1033b9.png" onmouseover="img_onmouseoverfunc(this)" onload="thumbImg(this)" border="0" alt="" />

丿啦灬啦啦 发表于 3 天前

就是浏览器通知而已,很多网站都有啊

xiaocai 发表于 3 天前

<div class="blockcode"><div id="code_heI"><ol><li>Notification.requestPermission().then((result) =&gt; {<br /><li>&nbsp;&nbsp;console.log(result);<br /><li>});</ol></div><em onclick="copycode($('code_heI'));">复制代码</em></div><br />
<div class="blockcode"><div id="code_y82"><ol><li>const n = new Notification(`来自 MJJ的第100个问候。`, {<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; tag: &quot;soManyNotification&quot;,<br /><li>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;});</ol></div><em onclick="copycode($('code_y82'));">复制代码</em></div>
页: [1]
查看完整版本: 这个是怎么做到的?能在系统中显示通知?