CFML標籤 |
種類 |
描述 |
cfabort |
流程控制 |
執行到此標籤後將立即結束處理該ColdFusion網頁。 |
|
<cfabort showError = "錯誤訊息"> |
|
|
|
cfapplication |
應用程式框架 |
定義應用程式;啟動客戶變數;指定客戶變數的儲存機制。 |
|
- <cfapplication
- name = "application名稱"
- loginStorage = "cookie" 或 "session"
- clientManagement = "Yes" 或 "No"
- clientStorage = "資料來源名稱" 或 "Registry" 或 "Cookie"
- setClientCookies = "Yes" 或 "No"
- sessionManagement = "Yes" 或 "No"
- sessionTimeout = #CreateTimeSpan(days, hours, minutes, seconds#
- applicationTimeout = #CreateTimeSpan(days, hours, minutes, seconds#
- setDomainCookies = "Yes" 或 "No">
|
|
|
|
cfargument |
擴展功能 |
在一個組成部份定義內建立一個參數定義。 |
|
- <cfargument
- name = "字串"
- type = "資料型態"
- required = "Yes" 或"No"
- default = "預設值"
- displayname = "提示名稱"
- hint = "提示內容">
|
|
|
|
cfchart |
資料輸出 |
產生並且展示一張圖表。 |
|
- <cfchart
- format = "flash, jpg, png "
- chartHeight = "像素值"
- chartWidth = "像素值"
- scaleFrom = "最小值"
- scaleTo = "最大值"
- showXGridlines = " Yes"或"No"
- showYGridlines = " Yes"或"No"
- gridlines = "行數(整數值)"
- seriesPlacement = "default, cluster, stacked, percent"
- foregroundColor = "16進位色碼或網頁色票名稱"
- dataBackgroundColor = "16進位色碼或網頁色票名稱"
- showBorder = " Yes"或"No"
- font = "字型"
- fontSize = "文字大小"
- fontBold = " Yes"或"No"
- fontItalic = " Yes"或"No"
- labelFormat = "number, currency, percent, date"
- xAxisTitle = "標題文字"
- yAxisTitle = "標題文字"
- xAxisType = "scale"或"category"
- yAxisType = "scale"或"category"
- sortXAxis = "yes/no"
- show3D = "Yes"或"No"
- xOffset = "介於-1到1 的數值"
- yOffset = "介於-1到1 的數值"
- rotated = "yes/no"
- showLegend = "yes/no"
- tipStyle = "MouseDown, MouseOver, none"
- tipBGColor = "16進位色碼或網頁色票名稱"
- showMarkers = "Yes"或"No"
- markerSize = "像素值"
- pieSliceStyle = "solid, sliced"
- url = "onClick事件時連結的網址"
- name = "字串">
- </cfchart>
|
|
|
|
cfchartseries |
資料輸出 |
確定圖表數據展示的風格。 |
|
- <cfchartseries
- type = "格式"
- query = "查詢欄結困名稱"
- itemColumn = "查詢欄位"
- valueColumn = "查詢欄位"
- seriesLabel = "Label Text"
- seriesColor = "16進位色碼或網頁色票名稱"
- paintStyle = "plain, raise, shade, light"
- markerStyle = "樣式"
- colorlist = "list">
- </cfchartseries>
|
|
|
|
cfcomponent |
擴展功能 |
建立並且定義一個ColdFusion元件。 |
|
- <cfcomponent
- extends = "anotherComponent"
- output = "Yes"或"No"
- displayname = "顯示名稱字串"
- hint = "提示文字字串">
- 變數聲明......
- <cffunction ...>
- ...
- </cffunction>
- <cffunction ...>
- ...
- </cffunction>
- </cfcomponent>
|
|
|
|
cffile |
文件管理標簽 |
上傳檔案至伺服端、進行對伺服端的檔案存取。 |
|
- <cffile
- action = "append"
- file = "絕對路徑名稱"
- outptu = "字串"
- addNewLine = "Yes"或"No"
- attributes = "檔案屬性列表"
- mode = "檔案屬檔限"
- 文字編碼 = "文字編碼選項">
- <cffile
- action = "copy"
- source = "絕對路徑名稱"
- destination = "絕對路徑名稱"
- mode = "檔案權限"
- attributes = "檔案屬性列表">
- <cffile
- action = "delete"
- file = "絕對路徑名稱">
- <cffile
- action = "move"
- source = "絕對路徑名稱"
- destination = "絕對路徑名稱"
- mode = "檔案權限"
- attributes = "檔案屬性列表"
- 文字編碼 = "文字編碼選項">
- <cffile
- action = "read"
- file = "絕對路徑名稱"
- variable = 變數名稱""
- 文字編碼 = "文字編碼選項">
- <cffile
- action = "readBinary"
- file = "絕對路徑名稱"
- variable = "變數名稱">
- <cffile
- action = "raname"
- sourcr = "絕對路徑名稱"
- destination = "絕對路徑名稱"
- mode = "檔案權限"
- attributes = "檔案屬性列表">
- <cffile
- action = "upload"
- fileField = "檔案來源"
- destination = "絕對路徑名稱"
- nameConflict = "行為指令"
- accept = "網路郵件延伸格式/檔案格式"
- mode = "檔案權限"
- attributes = "檔案屬性或列表">
- <cffile
- action = "write"
- file = "絕對路徑名稱"
- output = "內容"
- mode = "檔案權限"
- addNewLine = "Yes"或"No"
- attributes = "檔案屬性列表"
- 文字編碼 = "文字編碼選項">
|
|
|
|
cfform |
表單 |
建立JAVA表單。 |
|
- <cfform
- name = "名稱"
- action = "表單動作"
- preserveData = "Yes"或"No"
- onSubmit = "javascript"
- target = "視窗名稱"
- encType = "格式"
- passThrough = "HTML屬性"
- codeBase = "網址"
- archive = "網址"
- scriptSrc = "路徑"
- HTML 標準屬性...>
- ...
- </cfform>
|
|
|
|
cffunction |
擴展功能 |
建立函數 |
|
\
- <cffunction
- name = "方法名稱"
- returnType = "資料型態"
- roles = "執行權限"
- access = "private或package或public或remote"
- output = "Yes"或"No"
- displayName = "名稱"
- Hint = "說明提示文字">
|
|
|
|
cfif cfelse
cfelseif |
流程控制 |
使用 IF-THEN-ELSE 結構的流程控制。 |
|
- <cfif 運算式>
- HTML 以及 CFML 標籤
- <cfelseif 運算式>
- HTML 以及 CFML 標籤
|
|
- <cfelse>
- HTML 以及 CFML 標籤
- </cfif>
|
|
|
|
cfinclude |
流程控制 |
於本標籤所在之處插入指定的文件或程式。 |
|
<cfinclude template = "樣版檔名稱"> |
|
|
|
cfinput |
表單 |
使用於 cfform 標籤中建立一個 input 欄位,例如 radio、checkbox、text 等。 |
|
- <cfinput
- type = "input_type"
- name = "名稱"
- value = "initial_值"
- required = "Yes"或"No"
- range = "min_value, max_值"
- validate = "資料型態"
- onValidate = "javascript_funcion"
- pattern = "regexp"
- message = "validation_msg"
- onError = "文字"
- size = "整數值"
- maxLength = "整數值"
- checked
- passThrough = "HTML_屬性">
|
|
|
|
cfinvoke |
擴展功能 |
引用CFC、Web Service、或者CFML頁面上的函數。 |
|
- <!--- 引用 CFC 組件的函式方法 --->
- <cfinvoke
- component = "CFC名稱"
- method = "方法名稱"
- returnVariable = "變數名稱"
- argumentCollection = "資料集參數"
- ...>
- <!--- 引用網路服務 --->
- <cfinvoke
- webservice = "URL或WSDL位址"
- method = "函式名稱"
- username = "使用者名稱"
- password = "密碼"
- timeout = "逾期秒數"
- proxyServer = "WSDL proxy伺服器網址"
- proxyPort = "proxy伺服器通訊?號"
- proxyUser = "proxy伺服器使用者ID"
- proxyPassword = "proxy伺服器使用者密碼"
- inputParam1 = "值1"
- inputParam2 = "值2"
- ...
- returnVariable = "變數名稱"
- ...>
- <!--- 引用 cfobject 物件方法撰寫的CFC組件 --->
- <cfobject
- component = "組件名稱"
- name = "物件屬性名稱">
- <cfinvoke
- component = "#物件屬性名稱#"
- method = "方法名稱"
- returnVariable = "變數名稱"
- argumentCollection = "資料參數"
- ...>
- <!--- 引用以 cfobject 撰寫的網路服務 --->
- <cfobject
- webservice = "網路服務名稱"
- name = "物件屬性名稱"
- method = "函式名稱">
- <cfinvoke
- webservice = "#物件屬性名稱#"
- timeout = "逾時秒數"
- proxyServer = "WSDL proxy伺服器網址"
- proxyPort = "proxy伺服器通訊埠號"
- proxyUser = "proxy伺服器使用者ID"
- proxyPassword = "proxy伺服器使用者密碼"
- >
|
|
|
|
cfinvokeargument |
擴展功能 |
設定 CFC 參數。 |
|
- <cfinvokeargument
- name = "參數名稱"
- value = "參數值">
|
|
|
|
cflocation |
流程控制 |
開啟一 ColdFusion 網頁或 HTML 網頁。 |
|
- <cflocation
- url = "網址"
- addToken = "Yes"或"No">
|
|
|
|
cfloop |
流程控制 |
在設定好的狀況下重覆執行一段程式。 |
|
- 指定參數迴圈
- <cfloop
- index = "參數名稱"
- from = "起始值"
- to = "結束值"
- step = "增加值">
- ... HTML 或 CFML ...
- </cfloop>
- 條件運算式
- <cfloop
- condition = "運算式"
- ...
- </cfloop>
- 查詢結果迴圈
- <cfloop
- query = "查詢結果名稱"
- startRow = "列數"
- endRow = "列數">
- </cfloop>
- 檔案或列表迴圈
- <cfloop
- index = "索引名稱"
- list = "列表變數"
- delimiters = "分項符號">
- ...
- </cfloop>
- COM 或者 Struct 資料結構變數迴圈
- <cfobject
- class = FileFunctions.files
- name = FFunc
- action = Create>
- <cfset FFunc.Path = "c:\">
- <cfset FFunc.Mask = "*.*">
- <cfset FFunc.attributes = 16 >
- <cfset x = FFunc.GetFileList()>
- <cfloop collection = #FFUNC# item = "file2">
- <cfoutput>#file2.name#<br>
- </cfoutput>
- </cfloop>
|
|
|
|
cfoutput |
資料輸出 |
輸出變數值。 |
|
- <cfoutput
- query = "查詢結果名稱"
- group = "查詢欄位"
- groupCaseSensitive = "Yes"或"No"
- startRow = "起始列"
- maxRows = "最大顯示列數">
- </cfoutput>
|
|
|
|
cfparam |
變數處理 |
宣告一個變數並設定其預設值。 |
|
- <cfparamname = "參數名稱"
- type = "資料型態"
- default = "變數值">
|
|
|
|
cfquery |
資料庫操作 |
查詢資料庫。 |
|
- <cfquery
- name = "查詢結果名稱"
- dataSourec = "資料來源名稱"
- dbtype = "query"
- username = "使用者名稱"
- password = "密碼"
- maxRows = "數值"
- blockFactor = "查詢列數範圍"
- timeout = "秒數"
- cachedAfter = "日期"
- cachedWithin = "花費時間"
- debug = "Yes"或"No"
- 或者
- debug
- >
- SQL指令
- </cfquery>
|
|
|
|
cfreturn |
擴展功能 |
回應函式的處理結果。 |
|
<cfreturn expr> |
|
|
|
cfset |
變數處理 |
宣告一個變數並賦值給它。 |
|
<cfset var 變數名稱 = 運算式> |
|
|
|
cfswitch |
流程控制 |
可用此一標籤組合寫出流程的多個出口,傳入一值,以其值決定流程的方向。 |
|
- <cfswitch
- expression = "運算式">
- <cfcase
- value = "運算式結果"
- delimiters = "分項符號">
- </cfcase>
- <cfdefaultcase>
- <cfset value = "預設值">
- </cfdefaultcase>
- </cfswitch>
|
沒有留言:
張貼留言