+ 6
Styled/Sweet Alert in js
How to add a styled Alert in a website by using swal. And even that tick mark circling animation. How to use different types of sweet alert? How to use swal? What does it means}?
11 Answers
+ 16
Use this inside your code it will help you
<head>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js">
</script>
</head>
<body>
<script>
swal("thanks for visiting my code; don't forgot to upvote")
</script>
</body>
Don't forgot to use swal inside body otherwise it produce an error
+ 9
Swal is sweet alert which makes it decorative
To use it you have to do this
<script src=" "></script>
<script> swal(" any text")</script>
+ 5
+ 4
This link helped me!!
https://sweetalert.js.org/guides/
+ 3
There is also something like check in the alert how to do that like in this code
https://code.sololearn.com/We32oj07HPmq/?ref=app
+ 3
Divya Mohan may you please send a private code I didn't understand how to do
+ 3
No the first parameter should be title,
Second parameter will be message,
Third parameter will be type of alert.(success,warning,error,nfo)
So better if you write first parameter which you want to be heading of alert box.
https://sweetalert.js.org/guides/
+ 2
Where is codeđłđłđ§đ§
+ 2
You can even change button text also.
https://code.sololearn.com/WORg3d1DiZ8I/?ref=app
+ 2
For check put the value of
type:"success"
+ 2
Just change the value of type in swal fxn one by one to
success
error
info
warning.