Home > Web Front-end > JS Tutorial > Things to note about the default value of combobox in EasyUI_jquery

Things to note about the default value of combobox in EasyUI_jquery

WBOY
Release: 2016-05-16 16:11:59
Original
1138 people have browsed it

When modifying data, you need to load the data first.

When loading combobox data, the data passed from the background should be int type.

html code

Copy code The code is as follows:


Department:
         
           

           


javascript code

Copy code The code is as follows:

$('#belongs').combobox({
​ ​ url: 'opr/book/combobox.do',
          valueField: 'id',
         textField: 'name',
          width : '140',
Height: '29',
         editable : false,
panelHeight : 'auto',
onLoadSuccess : function(data) {
                var b1 = $('#belongsvalue').val(); //b1 is int type data
                $('#belongs').combobox('setValue', b1);
}
});

The above is the entire content of this article, I hope it can be helpful to everyone.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template