spring boot thymeleaf常用方式

Posted 谁将新樽辞旧月,今月曾经照古人

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了spring boot thymeleaf常用方式相关的知识,希望对你有一定的参考价值。

js中使用for循环

<script type="text/javascript" th:inline="javascript">

    /* <![CDATA[ */

    for(var i=1;i<3;i++){

        alert(i);

    }

    /* ]]> */

</script>

 

js中取出数据

<script th:inline="javascript">
</script>
var gid = /*[[${gid}]]*/ 0;

 


以上是关于spring boot thymeleaf常用方式的主要内容,如果未能解决你的问题,请参考以下文章