---
# System prepended metadata

title: sweetalert (AJAX用)

---

# sweetalert (AJAX用)

CDN 請放</body>前
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>


----
原本要ALERT的地方
swal("上面的文字", "下面的小字", "success");

success 可以改error 共有四種icon

https://w3c.hexschool.com/blog/13ef5369