Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/473.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在允许用户获得chrome浏览器通知后,如何刷新或重定向用户?_Javascript_Google Chrome_Push Notification - Fatal编程技术网

Javascript 在允许用户获得chrome浏览器通知后,如何刷新或重定向用户?

Javascript 在允许用户获得chrome浏览器通知后,如何刷新或重定向用户?,javascript,google-chrome,push-notification,Javascript,Google Chrome,Push Notification,在Chrome中,用户按下通知弹出窗口中的[允许]按钮(通知请求弹出窗口示例:)后,是否可以使用JavaScript或PHP刷新页面或将用户重定向到特定页面? window.location.assignJavaScript API。以及所有其他窗口。位置方法可能会有所帮助-MDN文档() Notification.requestPermission(function (permission) { // If the user accepts, let's create a not

在Chrome中,用户按下通知弹出窗口中的[允许]按钮(通知请求弹出窗口示例:)后,是否可以使用JavaScript或PHP刷新页面或将用户重定向到特定页面?


window.location.assign
JavaScript API。以及所有其他
窗口。位置
方法可能会有所帮助-MDN文档()
 Notification.requestPermission(function (permission) {
      // If the user accepts, let's create a notification
      if (permission === "granted") {
        //redirect using javascript here window.location
      }
    });