The best jQuery EasyUI form - format drop-down box (ComboBox) Tutorial In 2024, In this tutorial you can learn Download jQuery EasyUI examples,
This tutorial shows you how to create a simple drop-down box (Combobox), let it show picture items in the drop-down box. You can use the formatter function in the drop-down box (combobox) on to tell it how to format each entry.
<Input id = "cc" style = "width: 100px" url = "data / combobox_data.json" valueField = "id" textField = "text"> </ Input>
$ ( '# Cc'). Combobox ({ formatter: function (row) { var imageFile = 'images /' + row.icon; return '<img class = "item-img" src = "' + imageFile + '" /> <span class = "item-text">' + row.text + '</ span>'; } });