Freemarker 的常见控制结构写法(ZT)
来源:互联网 发布:电力监控软件布线 编辑:程序博客网 时间:2024/05/06 03:18
选择结构
if...else...
<#if condition>
...
<#elseif condition2>
...
<#elseif condition3>
...
<#else>
...
</#if>
<#if x = 1>
x is 1
</#if>
<#if x = 1>
x is 1
<#elseif x = 2>
x is 2
<#elseif x = 3>
x is 3
</#if>
<#if x = 1>
x is 1
<#elseif x = 2>
x is 2
<#elseif x = 3>
x is 3
<#elseif x = 4>
x is 4
<#else>
x is not 1 nor 2 nor 3 nor 4
</#if>
switch...case...default...
<#switch value>
<#case refValue1>
...
<#break>
<#case refValue2>
...
<#break>
<#case refValueN>
...
<#break>
<#default>
...
</#switch>
<#switch being.size>
<#case "small">
This will be processed if it is small
<#break>
<#case "medium">
This will be processed if it is medium
<#break>
<#case "large">
This will be processed if it is large
<#break>
<#default>
This will be processed if it is neither
</#switch>
<#switch x>
<#case x = 1>
1
<#case x = 2>
2
<#default>
d
</#switch>
循环迭代结构
<#list sequence as item>
...
</#list>
<#assign seq = ["winter", "spring", "summer", "autumn"]>
<#list seq as x>
${x_index + 1}. ${x}<#if x_has_next>,</#if>
</#list>
- Freemarker 的常见控制结构写法(ZT)
- 第十七章--不常见的控制结构
- 常见的makefile写法
- 常见的makefile写法
- 常见的makefile写法
- freemarker自定义标签的写法和使用
- 【代码大全】第17章 不常见的控制结构
- 自定义viewGroup的常见写法
- (ZT)谁在控制我们的浏览器?
- Linux 任务控制的几个技巧 zt
- jquery的窗口控制脚本(ZT)
- FreeMarker一些常见错误的总结
- freemarker常见的一些用法(一)
- 修改表结构的写法
- 常见的树结构
- freemarker中导入样式表的写法,以及javascript的写法注意
- java常见的枚举的写法
- 记录常见的输入输出流的写法
- 使用ObjectDataSource实现GridView的高效分页
- adodb分页函数初读
- 关于history.back()后,页面刷新的问题
- Mix-In的译法探讨
- Office文档控件
- Freemarker 的常见控制结构写法(ZT)
- 【原创】案例推理(CBR)中案例的存储与检索——EMC-CBR故障诊断研究(二)
- MYSQL出错代码列表
- Servlet中出现的由多线程引起的问题
- query must begin with SELECT or FROM: delete 错误解决方法
- Windows API函数大全
- 营销女皇董明珠
- 访问JAR和JAD文件中的属性
- excel 读出的值为空 解决方案