("#tree").dynatree({
minExpandLevel: 1,
//persist: true,
children: [{"title":"First Location",
"isFolder":true,
"expand":true,
"key":"location.92",
"icon":"location.gif",
"children":[{"title":"<span class='assetType'>First Location Child<\/span>",
"key":"locationid=92&typeid=1",
"expand":true,
"icon":"equipment.gif",
"children":[ (etc...)
所以我这样做:
var rootNode = $("#tree").dynatree("getRoot");
var title = rootNode.data.title;
title = null
...好的,所以我尝试:
var rootNode = $("#tree").dynatree("getRoot");
var node = rootNode.getChildren();
var title = node.data.title;
无法读取未定义的属性“标题”
如果我只是:
alert(node);
我得到:
DynaTreeNode<location.92>: '第一个位置'
所以...?
既然我在问,在控制台中:
jquery.dynatree.min.js:710:49:53.215 - Option 'title' is no longer supported.
?
有关的?
Uncaught TypeError: Cannot read property 'parentNode' of null
ra