freemark<#if>语句的用法案例

来源:互联网 发布:福建干部网络培训 编辑:程序博客网 时间:2024/05/30 23:40

<#if type == 1>//判断类型是否为1

<#if imgUrl??> //判断图片地址是否为空,如果不为空则执行下面的脚本

<img src="${imgUrl ! ''}" />

<#else>//否则 选择默认图片

<img src="../defalut.jpg" />

</#if>

</#if>

0 0