Javascript Toast Message Kullanımı

Genellikle ekranın belirli bir köşesinde belirli bir süre boyunca bir mesaj göstermek için kullanılır. ipucu veya açılır pencereler olarak da adlandırılır.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body onload="showContent('mesaj')">
<h1>Alkan Fatih</h1>
<h2>Toast Mesagge Kullanımı</h2>
<h3>Popup Mesaj Kullanımı</h3>
    <!-- Toastr -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
  <script>
     function showContent(mesaj) {
       toastr.options = {
         "closeButton": true, //Kapama butonu durumu
         "debug": false,
         "progressBar": false,
         "preventDuplicates": true,
         "positionClass": "toast-top-right", //Ekran görüntü seçenekleri: top-left(Yukarı Sol), top(yukari orta), bottom-left(aşağı sol), bottom(aşağı orta), bottom-right(aşağı sağ)
         "showDuration": "200",
         "hideDuration": "2000",
         "timeOut": "20000", //Gözükme süresi.
         "extendedTimeOut": "2000",
         "showEasing": "swing",
         "hideEasing": "linear",
         "showMethod": "fadeIn",
         "hideMethod": "fadeOut"
       }
       toastr["success"](mesaj);
       //Farklı mesaj türleri için yanda ki içerikleri kullanabilirsiniz. success(yeşil), danger(kırmızı), warning(sarı)
     }
  </script>
</body>
</html>

Örnek Görsel