$("#bzr").combobox({
url: "ClassSave.aspx?opt=bzr&bzr=<%=arrbj[2]%>",
valueField: "value",
textField: "text",
mode: "local",
filter: function (q, row) {
var opts = $(this).combobox('options');
var arrtext = row[opts.textField].split('|');
if (arrtext.length > 1) {
return (arrtext[0].indexOf(q) == 0 || arrtext[1].indexOf(q) == 0);
} else {
return arrtext[0].indexOf(q) == 0
}
}
});
combobox的text:1111|测试
填充combobox列表
<tr><td style="text-align:right">班主任</td><td style="text-align:left"><select id="bzr" name="bzr" class="easyui-combobox" style="150px" ><asp:Literal ID="lit_bzr" runat="server"></asp:Literal></select></td></tr>
后台cs代码
string type = RequestSafeValue("opt", false);
if (type == "bzr")
{
string bzr = RequestSafeValue("bzr", false);
OutputStr(pSub.EasyUIDownListbuild("TEA", "all", bzr));
}