jQuery EasyUI Form - Format Dropdown-Feld (ComboBox)
Dieses Tutorial zeigt, wie man ein einfaches Dropdown-Feld (Combobox) zu erstellen, lassen Sie es Bild Elemente in der Dropdown-Feld zeigen. Sie können die Formatierungsfunktion in der Drop-Down-Box (Combobox) verwenden, um auf sie zu sagen, wie jeder Eintrag zu formatieren.
Erstellen Sie ein Bild im Dropdown-Feld (Combobox)
<Input id = "cc" style = "width: 100px" url = "data / combobox_data.json" Valuefield = "id" textfield = "text"> </ Eingabe>
$ ( '# Cc'). Combobox ({ Formatierer: function (Zeile) { var imagefile = 'images /' + row.icon; return '<img class = "item-img" src = "' + imagefile + '" /> <span class = "item-text">' + row.text + '</ span>'; } });