var notification = new Notification(theTitle, options);
notification.onclick = function() {
window.location.href = theLink; //redirects to the specified link
};
我想通过点击通知框来打开一个新标签页。使用上述代码,重定向功能正常。但是我想在一个新的标签页中打开链接。我该怎么做?
var notification = new Notification(theTitle, options);
notification.onclick = function() {
window.location.href = theLink; //redirects to the specified link
};
我想通过点击通知框来打开一个新标签页。使用上述代码,重定向功能正常。但是我想在一个新的标签页中打开链接。我该怎么做?
window.open
- Donald Wu