I'm trying to write some Javascript code where I need to use a model attribute. Here is how I define the script tag:
<script type="text/javascript" th:inline="javascript">
/*<![CDATA[*/
//need some loops
/*]]>*/
</script>
What I need to do is, using each
iterations over model attributes inside the script. So far I couldn't manage to do this with th:each
. Any help is appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…