[英]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.