sweetalert script code example
Example 1: how to use sweetalert
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
Example 2: sweetalert
swal("Error!", "You clicked the button!", "error");
Example 3: sweetalert
Swal.fire({ title: 'Do you want to save the changes?', showDenyButton: true, showCancelButton: true, confirmButtonText: `Save`, denyButtonText: `Don't save`,}).then((result) => { /* Read more about isConfirmed, isDenied below */ if (result.isConfirmed) { Swal.fire('Saved!', '', 'success') } else if (result.isDenied) { Swal.fire('Changes are not saved', '', 'info') }})