首页 > 其他 > 详细

组装树状结构文本框

时间:2020-01-11 20:04:34      阅读:72      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 

 jsp代码===

<tr>
<td align="right">监测类别:</td>
<td><select class="easyui-combotree" style="margin-top: 7px"
name="monitoringCategory" id="monitoringCategory"
data-options="editable:false">
<option value="">请选择监测类别</option>
</select></td>
<td align="right">产品类别:</td>
<td><select name="productCategory" id="productCategory"
class="easyui-combotree" data-options="editable:false">
<option value="">请选择产品类别</option>
</select></td>
</tr>

 

js代码=======

//加载监测类别字典(添加)
$("#monitoringCategory").combotree({
url: ‘<%=basePath%>xyData/dict/LookupDictFid.do?fid=‘ + ‘213‘,
valueField: "id",
textField: "text",
lines: true,
required: true,
onBeforeExpand: function (node, param) {
$(this).tree(‘options‘).url = "<%=basePath %>xyData/dict/LookupDictFid.do?pid=" + node.id + "&fid=" + ‘213‘;
},
onBeforeSelect: function(node) {
if (!$(this).tree(‘isLeaf‘, node.target)) {
return false;
}
}

});

 

//加载产品类别字典(添加)
$("#productCategory").combotree({
url: ‘<%=basePath%>xyData/dict/LookupDictFid.do?fid=‘ + ‘214‘,
valueField: "id",
textField: "text",
lines: true,
required: false,
onBeforeExpand: function (node, param) {
$(this).tree(‘options‘).url = "<%=basePath %>xyData/dict/LookupDictFid.do?pid=" + node.id + "&fid=" + ‘214‘;
},
onBeforeSelect: function(node) {
if (!$(this).tree(‘isLeaf‘, node.target)) {
return false;
}
}
});

组装树状结构文本框

原文:https://www.cnblogs.com/xianz666/p/12180877.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!