一、方法1
1、在IDEA项目web中创建一个文件夹,里面放置jQuery库
2、在.jsp文件中添加
<script type="text/javascript" src="js/jquery-3.4.1.js"></script>
3、或者是在.jsp文件中添加
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.4.1.js"></script>
二、方法2
直接在.jsp文件中,添加在IDEA中使用 alt + enter 组合键 IDEA工具自动添加库
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>