阶段5 3.微服务项目【学成在线】_day04 页面静态化_07-freemarker基础-if指令





 

<td <#if stu.name=="小明">style="background-color:cornflowerblue"</#if>>${stu.name}</td>

 






金额大于300加背景颜色

大于号 和后面的标签结束 这两个区分不开谁是大于号 所以就报错了。



把大于号改成gt

<td <#if stu.money gt 300>style="background-color: cornflowerblue"</#if>${stu.money}</td>

 




大于号的判断在括号里面括起来

 <td <#if (stu.money gt 300)>style="background-color: cornflowerblue"</#if>${stu.money}</td>

 



 

结束



 

posted @ 2019-09-25 13:47  高山-景行  阅读(222)  评论(0编辑  收藏  举报