Advertisement
krot

sweetalert

Mar 2nd, 2019
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  2.        swal({
  3.         title:"confirmation",
  4.         text: "Are You Sure?",
  5.         content: "input",
  6.         buttons: {
  7.                 cancel: true,
  8.                 confirm: "Submit"
  9.             }
  10.         }).then( val => {
  11.             if(val) {
  12.                 swal({
  13.                     title: "Thanks!",
  14.                     text: "You typed: " + val,
  15.                     icon: "success"
  16.                 });
  17.             }
  18.         });
  19.     });
  20.  
  21.  
  22.  
  23.  swal({
  24.            title:"title",
  25.            text: "sssss?",
  26.            buttons: {
  27.                   cancel: true,
  28.                   confirm: "Submit"
  29.                     }
  30.     }).then( val => {
  31.            if(val)  {
  32.                    swal({
  33.                         title: "Thanks!",
  34.                         text: "You clicked submit",
  35.                         icon: "success"
  36.                         });
  37.                     }
  38.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement