我无法解决我的链接问题。您能帮上这个来链接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
请参阅此链接目录结构。
我无法解决我的链接问题。您能帮上这个来链接CSS和JS文件吗? CSS:
您的文件不在jsp文件夹
注意失败的URL:
如果您的资源带有woff扩展名并出现错误,则在web.config应用程序中添加以下代码将有助于修复。
将其添加到您的配置文件。然后将所有资源(例如img,css,js等)放入src> main> webapp> resources目录。
如果您的URL是:
在<handler>
中的web.config上添加以下代码(<system.webServer>
):
请安装适用于Ionic 3解决方案的App脚本npm i -D -E @ ionic / app-scripts
我在startup.cs中已添加app.UseStaticFiles();
此代码,而不是固定的代码
对我来说,错误是项目中未包含js文件夹下的文件,这解决了我的问题: