前台脚本初始化类型下树
$('#StyleID').combotree({
editable: false,
url: pageConfig.GetStyle,
multiple: true,
checkbox: true,
$('#StyleID').combotree({
editable: false,
url: pageConfig.GetStyle,
multiple: true,
checkbox: true,
});
获取文本框的值并存成数组,且用,隔开
StyleID: $("#StyleID").combotree('getValues').join(','),
在Controllers写从数据库获取数据的方法
public ActionResult GetStyle()
{
StyleLableBll stbll = new StyleLableBll();
var listStyle = stbll.Search(x => true).Select(x => new { id = x.ID, text = x.ShopStyle }).ToList();
return Json(listStyle);
}