- 已关闭。**此问题需要debugging details。当前不接受答案。
编辑问题以包含desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem。这将有助于其他人回答问题。
1小时前关闭。
Improve this question
我得到以下错误时,运行代码在我的本地主机使用谷歌浏览器.
- 我可以在使用Safari时查看工作代码,但在使用Chrome时无法查看!**
127.0.0.1/:55 GET http://127.0.0.1:5500/app.js/ net::ERR_ABORTED 500 (Internal Server Error) :5500/?task=#:1 Refused to execute script from 'http://127.0.0.1:5500/app.js/' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Task List</title>
<!-- Compiled and minified CSS -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<script
src="https://kit.fontawesome.com/83486dfd83.js"
crossorigin="anonymous"
></script>
</head>
<body>
<!-- removed, not important -->
<script
src="https://code.jquery.com/jquery-3.6.1.js"
integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI="
crossorigin="anonymous"
></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<script src="app.js"></script>
</body>
</html>
1条答案
按热度按时间xbp102n01#
我读了代码,我发现它确实使用了bootstrap,但你没有将链接添加到bootstarp文件的head中: