FreeMarker模板 if, else, elseif 指令 :

if, else, elseif 
语法 
<#if condition> 
  ... 
<#elseif condition2> 
  ... 
<#elseif condition3> 
  ... 
... 
<#else> 
  ... 
</#if> 
用例 
<#if x = 1> 
  x is 1 
</#if> 

<#if x = 1> 
  x is 1 
<#else> 
  x is not 1 
</#if> 

 

相关文章:

  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2021-09-12
猜你喜欢
  • 2022-12-23
  • 2021-12-02
  • 2021-11-21
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案