A beautiful replacement for javascript’s “ALERT” is Sweet Alert( a.k.a Swal)
Sweet Alert is a responsive alert which automatically centers itself
on the page and looks great no matter if you’re using a desktop computer, mobile or tablet.
It’s even highly customizeable.
You just need to include 1 JS file and 1 CSS file for Sweet Alert i.e.
<script src="./js/sweet-alert.min.js"></script> <link rel="stylesheet" href="./css/sweet-alert.css"> To call the sweetAlert-function you just need to do following:
swal({
title: "Error!",
text: "Here's my error message!",
type: "error",
confirmButtonText: "Cool"
});
It is highly customize-able to get rid out of alert().
For downloading needed JS and CSS and documentation you can visit:
Sweet Alert Website