jquery.combobox中文api和例子,修復(fù)了上面的小bug
更新時(shí)間:2011年03月28日 21:51:49 作者:
關(guān)于jquery.combobox,這個(gè)jquery的插件從官網(wǎng)上直接下載下來使用還有bug,以下是我對(duì)其api做的簡(jiǎn)單翻譯,而且修復(fù)了上面的bug。
修復(fù)bug后的代碼:jquery.combobox.js
下面是參數(shù)說明:
* comboboxContainerClass
o 設(shè)置整個(gè)控件的樣式名(包在最外邊)
* comboboxValueContainerClass
o 設(shè)置顯示選中文本和drop-down的樣式名
* comboboxValueContentClass
o 設(shè)置選中文本的顯示樣式
* comboboxDropDownClass
o 設(shè)置下拉選項(xiàng)的樣式
* comboboxDropDownButtonClass
o 設(shè)置下拉按鈕的樣式
* comboboxDropDownItemClass
o 設(shè)置下拉選項(xiàng)的樣式
* comboboxDropDownItemHoverClass
o 鼠標(biāo)移到選項(xiàng)上時(shí)的樣式
* comboboxDropDownGroupItemHeaderClass
o 設(shè)置optgroup ItemHeader的樣式
* comboboxDropDownGroupItemContainerClass
o 設(shè)置optgroup 元素的樣式
* animationType
o 設(shè)置動(dòng)畫效果的樣式,如slide,hide(100),默認(rèn)slide
* width
o 控件寬度
* height
o 控件高度
* onChange
o 當(dāng)選項(xiàng)變化時(shí)觸發(fā)該事件,接收兩個(gè)參數(shù),第一個(gè)是selecedIndex,第二個(gè)是selectedValue
下面是個(gè)簡(jiǎn)單示例:
<script type="text/javascript" language="javascript">
$(function () {
var settings = {
'width':200,
'onChange': function (selectedIndex,selectedVale) {
alert('value: ' + selectedVale);
}
};
var combobox = $("#combobox-tmpl-test").combobox(settings);
});
</script>
<select id="combobox-tmpl-test" name="testname" tabindex="3">
<option value="1">Kirill</option>
<option value="2">Yura</option>
<option value="3">Jhon Smith</option>
<option value="4">Mila</option>
</select>
下面是參數(shù)說明:
* comboboxContainerClass
o 設(shè)置整個(gè)控件的樣式名(包在最外邊)
* comboboxValueContainerClass
o 設(shè)置顯示選中文本和drop-down的樣式名
* comboboxValueContentClass
o 設(shè)置選中文本的顯示樣式
* comboboxDropDownClass
o 設(shè)置下拉選項(xiàng)的樣式
* comboboxDropDownButtonClass
o 設(shè)置下拉按鈕的樣式
* comboboxDropDownItemClass
o 設(shè)置下拉選項(xiàng)的樣式
* comboboxDropDownItemHoverClass
o 鼠標(biāo)移到選項(xiàng)上時(shí)的樣式
* comboboxDropDownGroupItemHeaderClass
o 設(shè)置optgroup ItemHeader的樣式
* comboboxDropDownGroupItemContainerClass
o 設(shè)置optgroup 元素的樣式
* animationType
o 設(shè)置動(dòng)畫效果的樣式,如slide,hide(100),默認(rèn)slide
* width
o 控件寬度
* height
o 控件高度
* onChange
o 當(dāng)選項(xiàng)變化時(shí)觸發(fā)該事件,接收兩個(gè)參數(shù),第一個(gè)是selecedIndex,第二個(gè)是selectedValue
下面是個(gè)簡(jiǎn)單示例:
復(fù)制代碼 代碼如下:
<script type="text/javascript" language="javascript">
$(function () {
var settings = {
'width':200,
'onChange': function (selectedIndex,selectedVale) {
alert('value: ' + selectedVale);
}
};
var combobox = $("#combobox-tmpl-test").combobox(settings);
});
</script>
<select id="combobox-tmpl-test" name="testname" tabindex="3">
<option value="1">Kirill</option>
<option value="2">Yura</option>
<option value="3">Jhon Smith</option>
<option value="4">Mila</option>
</select>
您可能感興趣的文章:
- jQuery EasyUI API 中文幫助文檔和擴(kuò)展實(shí)例
- Jquery api 速查表分享
- 不同的jQuery API來處理不同的瀏覽器事件
- jQuery EasyUI API 中文文檔 - TreeGrid 樹表格使用介紹
- jQuery EasyUI API 中文文檔 - Tree樹使用介紹
- jQuery EasyUI API 中文文檔 - PropertyGrid屬性表格
- jQuery EasyUI API 中文文檔 - DataGrid數(shù)據(jù)表格
- jQuery EasyUI API 中文文檔 - Dialog對(duì)話框
- jQuery EasyUI API 中文文檔 - TimeSpinner時(shí)間微調(diào)器
- Dreamweaver jQuery智能提示插件,支持版本提示,支持1.6api
- 如jQuery般易用的api風(fēng)格代碼分享
- jQuery validate 中文API 附validate.js中文api手冊(cè)
- jQuery EasyUI 中文API Layout(Tabs)
- jQuery EasyUI 中文API Button使用實(shí)例
- jquery 1.4.2發(fā)布!主要是性能與API
- jquery中有哪些api jQuery主要API
相關(guān)文章
JQuery統(tǒng)計(jì)input和textarea文字輸入數(shù)量(代碼分享)
本文主要介紹了jQuery實(shí)現(xiàn)統(tǒng)計(jì)輸入文字個(gè)數(shù)的方法,具有一定的參考價(jià)值,需要的朋友一起來看下吧2016-12-12
利用jQuery實(shí)現(xiàn)可輸入搜索文字的下拉框
jQuery實(shí)現(xiàn)點(diǎn)擊下拉框輸入框時(shí),自動(dòng)顯示下面的下拉列表,而且是根據(jù)輸入框中輸入的搜索添加,自動(dòng)在后臺(tái)查找,然后傳到前臺(tái),展現(xiàn)頁面2013-10-10
jQuery實(shí)現(xiàn)圖片與文字描述左右滑動(dòng)自動(dòng)切換的方法
這篇文章主要介紹了jQuery實(shí)現(xiàn)圖片與文字描述左右滑動(dòng)自動(dòng)切換的方法,涉及jquery實(shí)現(xiàn)圖文滑動(dòng)切換效果的方法,涉及jquery針對(duì)頁面元素與樣式的相關(guān)操作技巧,需要的朋友可以參考下2015-07-07
jQuery使用正則表達(dá)式替換dom元素標(biāo)簽用法示例
這篇文章主要介紹了jQuery使用正則表達(dá)式替換dom元素標(biāo)簽的方法,結(jié)合具體實(shí)例形式分析了jQuery正則替換的操作技巧,需要的朋友可以參考下2017-01-01
jQuery實(shí)現(xiàn)平滑滾動(dòng)頁面到指定錨點(diǎn)鏈接的方法
這篇文章主要介紹了jQuery實(shí)現(xiàn)平滑滾動(dòng)頁面到指定錨點(diǎn)鏈接的方法,涉及jquery鼠標(biāo)事件及頁面滾動(dòng)的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-07-07
利用jQuery設(shè)計(jì)一個(gè)簡(jiǎn)單的web音樂播放器的實(shí)例分享
這篇文章主要介紹了利用jQuery設(shè)計(jì)一個(gè)簡(jiǎn)單的web音樂播放器的實(shí)例分享,包括PHP后臺(tái)和從MySQL中讀取曲目等基本功能的實(shí)現(xiàn),需要的朋友可以參考下2016-03-03
jQuery實(shí)現(xiàn)動(dòng)態(tài)生成年月日級(jí)聯(lián)下拉列表示例
這篇文章主要介紹了jQuery實(shí)現(xiàn)動(dòng)態(tài)生成年月日級(jí)聯(lián)下拉列表,結(jié)合具體實(shí)例形式分析了jQuery日期時(shí)間運(yùn)算構(gòu)造級(jí)聯(lián)下拉列表相關(guān)操作技巧,需要的朋友可以參考下2019-05-05

