dtree 的 使用 target 对应 ifame 的 name 而不是 id

来源:互联网 发布:美发股份分配怎么算法 编辑:程序博客网 时间:2024/05/18 03:23
 

Functions

add()

Adds a node to the tree.
Can only be called before the tree is drawn.

id, pid and name are required.

Parameters

NameTypeDescriptionidNumberUnique identity number.pidNumberNumber refering to the parent node. The value for the root node has to be -1.nameStringText label for the node.urlStringUrl for the node.titleStringTitle for the node.targetStringTarget for the node.iconStringImage file to use as the icon. Uses default if not specified.iconOpenStringImage file to use as the open icon. Uses default if not specified.openBooleanIs the node open.

Example

mytree.add(1, 0, 'My node', 'node.html', 'node title', 'mainframe', 'img/musicfolder.gif');


openAll()

Opens all the nodes.
Can be called before and after the tree is drawn.

Example

mytree.openAll();


closeAll()

Closes all the nodes.
Can be called before and after the tree is drawn.

Example

mytree.closeAll();


openTo()

Opens the tree to a certain node and can also select the node.
Can only be called after the tree is drawn.

Parameters

NameTypeDescriptionidNumberIdentity number for the node.selectBooleanShould the node be selected.

Example

mytree.openTo(4, true);

Configuration

VariableTypeDefaultDescriptiontargetStringtrueTarget for all the nodes.folderLinksBooleantrueShould folders be links.useSelectionBooleantrueNodes can be selected(highlighted).useCookiesBooleantrueThe tree uses cookies to rember it's state.useLinesBooleantrueTree is drawn with lines.useIconsBooleantrueTree is drawn with icons.useStatusTextBooleanfalseDisplays node names in the statusbar instead of the url.closeSameLevelBooleanfalseOnly one node within a parent can be expanded at the same time. openAll() and closeAll() functions do not work when this is enabled.inOrderBooleanfalseIf parent nodes are always added before children, setting this to true speeds up the tree.

Example

mytree.config.target = "mytarget";

原创粉丝点击