bro*_*ode 2 javascript notifications webkit
一旦通知实例化 onclick 函数就会触发,但我想在通知上发生实际点击之前阻止此事件
var message = new Notification("RandomString");
message.onclick(alert("Random Message"))
Run Code Online (Sandbox Code Playgroud)
尝试这个:
var message = new Notification("RandomString");
message.onclick = function(){alert("Random Message")};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11729 次 |
| 最近记录: |