- 注册时间
- 2012-9-24
- 最后登录
- 2017-7-1
- 阅读权限
- 10
- 积分
- 364
- 精华
- 0
- 帖子
- 59
|
- <input id="testCombo" class="mini-combobox" style="width: 100px;" textfield="Text" valuefield="Value" required="true" />
复制代码- var comboBox = mini.get('testCombo');
- var data = [
- { Text: 'item0', Value: 'val0' },
- { Text: 'item1', Value: 'val1' },
- { Text: 'item2', Value: 'val2' },
- { Text: 'item3', Value: 'val3' }
- ];
- comboBox.setData(data);
- comboBox.select(0);
- mini.alert(comboBox.getText());
- comboBox.select(1);
- mini.alert(comboBox.getText());
- comboBox.select(2);
- mini.alert(comboBox.getText());
复制代码 调用select后不会清除以前的选择项
|
|