我没有得到甜蜜的警报,我认为它与语法有关。有人可以告诉我我应该怎么做甜蜜的警报语法
<!DOCTYPE html>
<html>
<head>
<title>Testing</title>
<script src="dist/sweetalert.min.js"></script>
<link rel="stylesheet" type="text/css" href="dist/sweetalert.css">
</head>
<body>
<script>
swal({
title: 'Confirm',
text: 'Are you sure to delete this message?',
type: 'warning',
showCancelButton: true,
confirmButtonText: 'Yes, sir',
cancelButtonText: 'Not at all'
});
</script>
</body>
</html>
您可以检查任何错误的开发者控制台? –
也在控制台中是swal可用作为全局? – markyph
我复制并粘贴,所以我怀疑是有错误 – 987654321