修复bug后的代码:jquery.combobox.js 下面是参数说明: * comboboxContainerClass o 设置整个控件的样式名(包在最外边) * comboboxValueContainerClass o 设置显示选中文本和drop-down的样式名 * comboboxValueContentClass o 设置选中文本的显示样式 * comboboxDropDownClass o 设置下拉选项的样式 * comboboxDropDownButtonClass o 设置下拉按钮的样式 * comboboxDropDownItemClass o 设置下拉选项的样式 * comboboxDropDownItemHoverClass o 鼠标移到选项上时的样式 * comboboxDropDownGroupItemHeaderClass o 设置optgroup ItemHeader的样式 * comboboxDropDownGroupItemContainerClass o 设置optgroup 元素的样式 * animationType o 设置动画效果的样式,如slide,hide(100),默认slide * width o 控件宽度 * height o 控件高度 * onChange o 当选项变化时触发该事件,接收两个参数,第一个是selecedIndex,第二个是selectedValue 下面是个简单示例: 复制代码 代码如下: <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>
推荐阅读
myeclipse安装jQuery插件的方法
1、在网上下载spket-1.6.12.zip压缩文件,解压后会看到eclipse目录下有features、plugins这两个文件夹
2、把features、plugins这两个文件夹下的文件复制黏贴到D:myeclipse6.5myeclipseeclipse目录下(注意featu>>>详细阅读
本文标题:jquery.combobox中文api和例子,修复了上面的小bug
地址:http://www.17bianji.com/kaifa2/JS/24770.html
1/2 1