EasyUI Combobox sets the default value, easyuicombobox
/*** Bind the carrier and set the default value. The CMCC value is displayed. The value is 1 */$ ('# operatingId '). combobox ({url: 'Data _ url', valueField: 'id', textField: 'name', mode: 'remote', onLoadSuccess: function () {$ ("# operatingId "). combobox ("select", "CMCC"); $ ("# operatingId "). combobox ("setValue", 1 );}});
Jquery easyui combobox dynamic setting default value
$ ('# CC'). combobox ({
OnLoadSuccess: function (){
$ ('# CC'). combobox ('select',' option valueField ');
}
});
Easyui combobox automatically displays default values
When I return a result in the background, add a row before the list.
{Sid:-1, stockName: ''} or {sid:-1, stockName: '-- select --'}
You need to judge when submitting. If selectValue is-1, you are prompted to select
Another method is in the combobox loadFilter:
$ ('# CC '). combobox ({loadFilter: function (data) {// push a piece of data to the data array {sid:-1, stockName :''}}});