Sweet alert

<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="sweetalert-master/dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert-master/dist/sweetalert.css">
  
</head>
<body>
   <button onclick="foo()">Try me</button>
   <script>
function foo()
{
swal({
     title: "Success!",
  text: "Here's my error message!",
  type: "success",
  confirmButtonText: "Cool"
});
}
   </script>

</body>

</html>



<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="sweetalert-master/dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert-master/dist/sweetalert.css">
  
</head>
<body>
   <button onclick="foo()">Try me</button>
   <script>
function foo()
{
swal({
    title: "Error!",
  text: "Here's my error message!",
type: "error",
  confirmButtonText: "cancel"
});
}
   </script>
</body>
</html>



<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="sweetalert-master/dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="sweetalert-master/dist/sweetalert.css">
  
</head>
<body>
   <button onclick="foo()">Try me</button>
   <script>
function foo()
{
swal({
    title: "Error!",
  text: "Here's my error message!",
  type: "success",
  confirmButtonText: "cancel"
});
}
</script>
</body>
</html>




猜你喜欢

转载自blog.csdn.net/qq_35774189/article/details/77285542
今日推荐