javascript - 无法加载资源 : the server responded with a status of 404 (Not Found)

标签 javascript html css relative-path

我无法解决我的链接问题。你能帮忙解决这个链接 CSS 和 JS 文件的问题吗?

CSS:

<link  href="../Jquery/jquery.multiselect.css" rel="stylesheet"/>
<link  href="../Jquery/style.css" rel="stylesheet" />
<link  href="../Jquery/prettify.css" rel="stylesheet" />

JS:

<script  src="../Jquery/jquery.multiselect.js"></script>
<script  src="../Jquery/prettify.js"></script>

错误:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/style.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.js
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js

引用此链接目录结构。

enter image description here

最佳答案

您的文件不在jsp 文件夹 下,这就是找不到它的原因。 您必须再次返回 1 个文件夹 试试这个:

<script src="../../Jquery/prettify.js"></script>

关于javascript - 无法加载资源 : the server responded with a status of 404 (Not Found),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22317206/

相关文章:

javascript - Onclick事件+Enter键

html - IE11 的 CSS Grid 自动重复列 flexbox 替代品

html - Flexbox/由于嵌套元素而扩展高度

javascript - 上传到同一路径时如何强制 firebase 存储返回新的签名 url?

javascript - RequireJS 在 IE9 中不工作

html - 如何阻止链接在 CSS 下拉菜单中换行到多行?

javascript - Bootstrap Navbar Active State Switching Bootstrap (Javascript相关)

css - 对于 IE8 - 尝试结合 CSS 显示的 table_cell 将单元格间距/填充设置为 0px

javascript - Vuejs - 元素用户界面 - 无法关闭带有十字的对话框

javascript - 在 Jquery 中使用 .css() 中的变量