ALERTIFY.js是為了美化通知訊息而生的套件

GitHub

CDN

<!-- ALERTIFY.js v0.3.11 -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/alertify.js/0.3.11/alertify.core.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/alertify.js/0.3.11/alertify.default.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/alertify.js/0.3.11/alertify.min.js"></script>

alert使用方式

<script>
	alertify.alert( "Hello World" );
</script>

result

confirm使用方式

<script>
	alertify.confirm( "Hello World", function (e) {
		if (e) {
			// ok
		} else {
			// cancel
		}
	});
</script>

result

摘自