不同之处已做高亮。
jsp 写法:
<script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-3.2.0.min.js"></script> <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/login.css"></link> <script type="text/javascript"> $.ajax({ url : ‘${pageContext.request.contextPath }/syslogin/login‘ )} </script>
spring boot thymeleaf 写法:
<script type="text/javascript" th:src="@{/js/jquery-3.2.0.min.js}"></script>
<link rel="stylesheet" type="text/css" th:href="@{/css/login.css}">
<script type="text/javascript"> $.ajax({ url : ‘[[@{/syslogin/login}]]‘ )} </script>
原文地址:https://www.cnblogs.com/enenen/p/10126267.html
时间: 2024-10-11 21:09:02