“notification push javascript” Réponses codées

notification push javascript

function notifyMe(title,body) {
         if (Notification.permission !== 'granted'){
          Notification.requestPermission();
          alert('Allow Notification Please');
         }else {
          var notification = new Notification(title, {
           icon: '../assets/img/brand/logo.png',
           body: body,
           data: 'Nomad Chat',
           vibrate: [200, 100, 200]
          });
          notification.onclick = function() {
           window.open('chat.php');
          };
         }
        }
faheem

Données Soumettre la notification dans JavaScript

  <script src="http://www.jqueryscript.net/demo/Sliding-Growl-Notification-Plugin-For-jQuery-jsnotify/dist/js/notify.js"></script>
  <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
  <link href="http://www.jqueryscript.net/demo/Sliding-Growl-Notification-Plugin-For-jQuery-jsnotify/dist/css/notify.css" rel="stylesheet"/>
  <link href="http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" rel="stylesheet"/>
  
  
  <form action="" method="post" id="myDiv">
  <input type="text" name="name" id="n1">
  <input type="text" name="mobile" id="n2">
  <input type="submit" name="submit" value="click me">
  </form>
Doubtful Donkey

Réponses similaires à “notification push javascript”

Questions similaires à “notification push javascript”

Plus de réponses similaires à “notification push javascript” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code