我是HTML和JavaScript的初学者。我想将
答案 0 :(得分:3)
初学者(https://sweetalert.js.org/guides/#installation)时应通过CDN包含库。也许您可以使用Webpack并通过NPM安装软件包。
这是您输入代码的提示:
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<div id="content">
<script type="text/javascript">
function myFunction() {
console.log("problem with student");
swal("You entered the regno more than once", " Your team is not registered yet! Register Again", "error");
}
myFunction();
</script>
</div>