how to use sweet alert in html?

Today, We want to share with you how to use sweet alert in html.In this post we will show you sweet alert html, hear for how to use sweet alert in php we will give you demo and example for implement.In this post, we will learn about how to use sweet alert in codeigniter? with an example.

how to use sweet alert in javascript?

Example 1: sweet alert 2 do action on confirm{  
  title: 'Do you want to save the changes?',  
  showDenyButton: true,  showCancelButton: true,  
  confirmButtonText: `Save`,  
  denyButtonText: `Don't save product`,
}).then((result) => {    
    if (result.isConfirmed) {'Saved!', '', 'success')  
    } else if (result.isDenied) {'Product Changes are not saved', '', 'info')  

sweet alert js

     title: "Deleted!",
     text: "Your row has been deleted.",
     button: "Close", // Text on button
     icon: "success", 
     timer: 3000, 
      buttons: {
        confirm: {
          text: "OK",
          value: true,
          visible: true,
          className: "",
          closeModal: true
        cancel: {
          text: "Cancel",
          value: false,
          visible: true,
          className: "",
          closeModal: true,

sweet alert

<script src="[email protected]"></script>

Sweet Alert – Success Message


<h1>Sweet Alert.js</h1>
<button>Welcome, To free Download!</button>

JS Code

$("button").click(function() {
  swal("Product Updated Successfully", "Good Luckk, you pressed a button", "success")

CSS Code

  text-align: center;
  font-size: 14px;
  background-color: #DBE3E6;
  font-family: 'Pacifico', cursive;
  font-size: 6em;
  color: #252E40;
  line-height: 2.0em;
  background-color: #F16669;
  border: none;
  padding: 15px 20px;
  color: white;
  font-size: 2em;
  margin-top: 40px;
  transition: 1s;
  cursor: pointer;
  border-radius: 4px;

  background-color: darken(#F16669, 30)

I hope you get an idea about sweet alert multiple inputs.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.