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

  • 關於本站
  • 免責聲明