国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

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

2019-11-20 23:38:41
字體:
供稿:網(wǎng)友

擴展自 $.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">

復制代碼 代碼如下:

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

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

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

特性

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

名稱

類型

說明

默認值

valueField

string

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

value

textField

string

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

text

mode

string

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

local

url

string

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

null

method

string

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

post

data

array

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

null

filter

function

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

 

formatter

function

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

 

事件

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

名稱

參數(shù)

說明

onLoadSuccess

none

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

onLoadError

none

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

onSelect

record

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

onUnselect

record

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

方法

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

名稱

參數(shù)

說明

options

none

返回 options 對象。

getData

none

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

loadData

data

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

reload

url

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

setValues

values

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

setValue

value

設置組合框的值。

clear

none

清除組合框的值。

select

value

選擇指定的選項。

unselect

value

取消選擇指定的選項。


風流涕淌 翻譯

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 三江| 黑水县| 泰和县| 林甸县| 苏州市| 黔东| 庆云县| 孟州市| 彝良县| 曲周县| 宁武县| 黄浦区| 江孜县| 宣恩县| 阳江市| 株洲县| 内黄县| 长岛县| 大厂| 石棉县| 龙南县| 任丘市| 赣州市| 色达县| 乌拉特后旗| 济源市| 镇江市| 公安县| 武陟县| 会同县| 察隅县| 米脂县| 淳化县| 富宁县| 达孜县| 襄樊市| 台北县| 九江市| 安宁市| 香港| 广水市|