亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jQuery EasyUI API 中文文檔 - ComboBox組合框

 更新時間:2011年10月07日 22:21:35   作者:  
jQuery EasyUI API 中文文檔 - ComboBox組合框,使用jQuery EasyUI的朋友可以參考下。

擴展自 $.fn.combo.defaults $.fn.combobox.defaults 重寫了 defaults。

 


依賴
combo
用法
<select id="cc" name="dept" style="width:200px;">
<option value="aa">aitem1</option>
<option>bitem2</option>
<option>bitem3</option>
<option>ditem4</option>
<option>eitem5</option>
</select>
<input id="cc" name="dept" value="aa">

復(fù)制代碼 代碼如下:

$('#cc').combobox({
url:'combobox_data.json',
valueField:'id',
textField:'text'
});

json 數(shù)據(jù)格式的示例
復(fù)制代碼 代碼如下:

[{
"id":1,
"text":"text1"
},{
"id":2,
"text":"text2"
},{
"id":3,
"text":"text3",
"selected":true
},{
"id":4,
"text":"text4"
},{
"id":5,
"text":"text5"
}]

特性

其特性擴展自 combo,下列是為combobox 增加的特性。

名稱

類型

說明

默認(rèn)值

valueField

string

綁定到 ComboBox value 上的基礎(chǔ)數(shù)據(jù)的名稱。

value

textField

string

綁定到 ComboBox text 上的基礎(chǔ)數(shù)據(jù)的名稱。

text

mode

string

定義在文本改變時如何加載列表數(shù)據(jù)。如果組合框從服務(wù)器加載就設(shè)為 'remote'

local

url

string

從遠(yuǎn)程加載列表數(shù)據(jù)的 URL 。

null

method

string

用來檢索數(shù)據(jù)的 http method

post

data

array

被加載的列表數(shù)據(jù)。

null

filter

function

定義當(dāng) 'mode' 設(shè)為 'local' 時如何過濾數(shù)據(jù)。這個函數(shù)有兩個參數(shù):
q
:用戶輸入的文字
row
:列表中的行數(shù)據(jù)。
返回 true 就允許顯示該行。

 

formatter

function

定義如何呈現(xiàn)行。這個函數(shù)有一個參數(shù):row。

 

事件

其事件擴展自 combo,下列是為 combobox 增加的事件。

名稱

參數(shù)

說明

onLoadSuccess

none

當(dāng)遠(yuǎn)程數(shù)據(jù)加載成功時觸發(fā)。

onLoadError

none

當(dāng)遠(yuǎn)程數(shù)據(jù)加載失敗時觸發(fā)。

onSelect

record

當(dāng)用戶選擇一個列表項時觸發(fā)。

onUnselect

record

當(dāng)用戶取消選擇一個列表項時觸發(fā)。

方法

其方法擴展自 combo,下列是為 combobox 追加或重寫的方法。

名稱

參數(shù)

說明

options

none

返回 options 對象。

getData

none

返回加載的數(shù)據(jù)。

loadData

data

加載本地列表數(shù)據(jù)。

reload

url

請求遠(yuǎn)程的列表數(shù)據(jù)。

setValues

values

把數(shù)組設(shè)置為組合框的值。

setValue

value

設(shè)置組合框的值。

clear

none

清除組合框的值。

select

value

選擇指定的選項。

unselect

value

取消選擇指定的選項。


風(fēng)流涕淌 翻譯

相關(guān)文章

最新評論