TayYeh
|
|
« on: April 19, 2012, 03:56:19 AM » |
|
<select id="cc" class="easyui-combobox" name="state" style="width:200px;" required="true"> <option value="1">test1</option> <option value="2">test2</option> <option value="3">test3</option> </select> <script> $(document).ready(function () { $('#cc').combobox({ onSelect:function(n,o){....}, onChange:function(n,o){....} }); } </script>
1.if combobox is selected "test1" item, then input "1". don't have any event.
2.if combobox is selected "test1" item,use [getValue] will get "1". if input "1" ,use [getValue] will get "1". they are same!! I think, command must explicit. It is better, if have [getSelectedValue],[getSelectedText],[getText] command. When change select, [getSelectedValue] = itesm.value, [getSelectedText] = item.text, [getText] = null When input text, [getSelectedValue] = null, [getSelectedText] = null, [getText] = input text
|