logo
  • 教程列表
  • SO官方文档
  • CFLOOP 方法
    • 排列
    • 列表循环
    • 询问
    • 结构体
    • 文件循环
    • 使用 CFML 标记循环访问集合
    • 使用 CFSCRIPT 循环访问集合
    • 指数
    • 条件
    • 日期或时间范围
    • 名单
    • 索引循环
    • 查询循环
    • 文件
    • 条件循环
    • COM CollectionStructure 循环
  1. StackOverflow 文档
  2. coldfusion 教程
  3. CFLOOP 方法
  4. 条件循环

条件循环

Created: November-22, 2018

你可以使用 condition 属性指定要使用的条件。

<cfset myVar=false>
<cfloop condition="myVar eq false">
    <cfoutput>
    myVar = <b>#myVar#</b>  (still in loop)<br />
 </cfoutput>
    <cfif RandRange(1,10) eq 10>
        <cfset myVar="true">
    </cfif>
</cfloop>
<cfoutput>
    myVar = <b>#myVar#</b> (loop has finished)
</cfoutput>
  • COM CollectionStructure 循环
  • 文件

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明