EasyUi combotree 实现动态加载树节点_javascript技巧

WBOY
Release: 2016-05-16 15:06:54
Original
1568 people have browsed it

推荐阅读:

简介EasyUI datagrid editor combogrid搜索框的实现

EasyUi中的Combogrid 实现分页和动态搜索远程数据

easyui 1.2.4例子中并没有给出动态加载树节点的例子,只好自己研究。

从源码中可知可以看出combotree 是继承 combo 和 tree两个控件,所以在展开其下级子节点时,把combotree内置的tree的options选项的url重置成一个动态取选择值的url,代码如下:

$('#cc').combotree({ url:"treejson.aspx?act=allregion&parentid=0", onBeforeExpand:function(node){ $('#cc').combotree("tree").tree("options").url= "treejson.aspx?act=allregion&parentid=" + node.id; } });
Copy after login

以上内容是小编给大家介绍的EasyUi combotree 实现动态加载树节点的相关知识,希望对大家有所帮助!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!