欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

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

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

擴(kuò)展自 $.fn.combo.defaults $.fn.combobox.defaults 重寫(xiě)了 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"
}]

特性

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

名稱(chēng)

類(lèi)型

說(shuō)明

默認(rèn)值

valueField

string

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

value

textField

string

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

text

mode

string

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

local

url

string

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

null

method

string

用來(lái)檢索數(shù)據(jù)的 http method 。

post

data

array

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

null

filter

function

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

 

formatter

function

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

 

事件

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

名稱(chēng)

參數(shù)

說(shuō)明

onLoadSuccess

none

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

onLoadError

none

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

onSelect

record

當(dāng)用戶選擇一個(gè)列表項(xiàng)時(shí)觸發(fā)。

onUnselect

record

當(dāng)用戶取消選擇一個(gè)列表項(xiàng)時(shí)觸發(fā)。

方法

其方法擴(kuò)展自 combo,下列是為 combobox 追加或重寫(xiě)的方法。

名稱(chēng)

參數(shù)

說(shuō)明

options

none

返回 options 對(duì)象。

getData

none

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

loadData

data

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

reload

url

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

setValues

values

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

setValue

value

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

clear

none

清除組合框的值。

select

value

選擇指定的選項(xiàng)。

unselect

value

取消選擇指定的選項(xiàng)。


風(fēng)流涕淌 翻譯

相關(guān)文章

最新評(píng)論