
本篇文章带大家来了解一下freemarker的常见语法的基本使用。
style.css文件内容:
body{
background-color: lightblue;
}ftl文件中的引入:
<link href="/css/style.css" rel="stylesheet">对于js或图片等效果使用方法相同。
使用类似EL表达式。
${name}<td>${student.idNo}</td>
<td>${student.name}</td><#list students as student>
<tr>
<td>${student.idNo}</td>
<td>${student.name}</td>
</tr>
</#list><#list students as student>
${student_index}
</#list><#if grade == "A">
${student.name}
<#else>
NoBody
</#if>