minost

最近忙着写毕设呢,IDEA导入jquery的时候报404错误。

按理说路径也没问题啊之前一直这么写的

<script type="text/javascript" src="js/jquery-3.5.1.js" ></script>

前端报错如下:

jquery-3.5.1.js:1 Failed to load resource: the server responded with a status of 404 ()

解决方案如下:

在原路径前加上绝对路径表达式  ${pageContext.request.contextPath} 

 <script type="text/javascript" src="${pageContext.request.contextPath}js/jquery-3.5.1.js" ></script>

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-09-24
  • 2022-12-23
  • 2022-01-13
  • 2021-04-20
  • 2021-11-09
  • 2021-08-26
  • 2021-11-02
猜你喜欢
  • 2021-07-29
  • 2021-07-15
  • 2021-08-14
  • 2021-05-19
  • 2021-12-20
  • 2021-11-06
相关资源
相似解决方案