easyui_tree

  • id: node id, which is important to load remote data
  • text: node text to show
  • state: node state, 'open' or 'closed', default is 'open'. When set to 'closed', the node have children nodes and will load them from remote site
  • checked: Indicate whether the node is checked selected.
  • attributes: custom attributes can be added to a node
  • children: an array nodes defines some children nodes

state:closed--可能造成自动获取(无限获取),可改为state:open

对多张表数据以树的形式展现可以用attributes来区分来自那张表

$('#tr').tree({
  url: "ashx/tree.ashx",

  onClick: function (node) {

  if (node.attributes == "国家") {
  }

});

--1(表1,例:国家)

----11(表2,例:省/州)

----12

------121(表3,例:城市)

--2

----22

----23

原文地址:https://www.cnblogs.com/yuluhuang/p/3450730.html