其他分享
首页 > 其他分享> > theamleaf+js获取后台model.addAttribute传递过来的值

theamleaf+js获取后台model.addAttribute传递过来的值

作者:互联网

 model.addAttribute("types",typeService.seleTypesByParentId(-1));//查询一级标题

前端

<html lang="en" xmlns:th="http://www.thymeleaf.org"> xmlns:color="http://www.w3.org/1999/xhtml">
<script th:inline="javascript" type="text/javascript" rel="script">
 let types = [[${types}]];
</script>
</html>

注意!!!!!

<html lang="en" xmlns:th="http://www.thymeleaf.org"> 
th:inline="javascript"

标签:www,color,theamleaf,addAttribute,typeService,model,types
来源: https://blog.csdn.net/T623048540/article/details/120902415