[英]Including external js files
我正在尝试使用 jQuery 和 Sweetalert 的脚本,它运行良好,直到我将自定义 js 移动到单独的文件中,然后停止工作,另外控制台显示,虽然我已经加载了 head 标签中的所有内容,但只有 jquery 出现在那里,其他两个文件显示在 body 标签中?
<head>
<title>Inserting, copying and removing elements</title>
<link rel="stylesheet" href="css/styles.css" />
<!-- include jQuery-->
<script src="js/jquery.js"></script>
//Include sweetalert//
<script src="js/sweetalert.min.js"></script>
<!-- include custom js -->
<script src="js/custom.js"></script>
</head>
您的评论的语法是错误的第二个评论,其结果以书面纯文本的内部<head>
标记,把你的其他<head>
到体内。
只需像其他人一样编辑您的第二条评论:
<head>
<title>Inserting, copying and removing elements</title>
<link rel="stylesheet" href="css/styles.css" />
<!-- include jQuery-->
<script src="js/jquery.js"></script>
<!-- include sweetalert-->
<script src="js/sweetalert.min.js"></script>
<!-- include custom js -->
<script src="js/custom.js"></script>
</head>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.