How to customize the alert in JavaScript or jQuery?

Could you please share a way to customize the alert in javascript or jquery.

We can customize the alert box by using a library that is sweet alert. It is easy to use and has a nice effect which anybody can use in their websites to get different look.

First include the library and then use below syntaxes. There are different ways to use and get alert boxes:

<script src=""></script>

swal("Hello World")

If you pass two arguments then first will be the model's title and other one as a alert box text.

swal("Title of model", "Text of alertbox")

And if you pass three arguments then the third one will expression icon and those are "warning", "error", "success" and "info".

swal("Nice work!", "Work done correctly", "success")

There are many other options too, to use the sweet alert in different ways. For more, visit to below URL: