1.后台
@RequestMapping("/toWaitReferPage")
public String toWaitReferPage(HttpServletRequest request, Integer pageType){
request.setAttribute("pageType",pageType);
return "waitrefer/waitReferPage";
}
3.页面取值
<p th:text="#{pageType}">default pageType</p>
4.js中取值
<script th:inline="javascript">
var message = [[${pageType}]];
console.log(pageType);
</script>
标签:取值,thmeleaf,request,js,后端值,pageType,toWaitReferPage,页面 From: https://blog.51cto.com/u_11334685/5740996