点击treeview的一个节点,javascript中如何触发treeview的展开事件(onexpand)?
如题,或者说:点击treeview的一个节点,javascript中如何展开选中节点的下一级节点呢?
[解决办法]
<SCRIPT language= "javascript "> <!-- function ExpandChild() { var selNode = TreeView1.getTreeNode(TreeView1.selectedNodeIndex);if(selNode != null){ExpandChildByNode(selNode);}}function ExpandChildByNode(node){var nodes = node.getChildren(); for(var i=0;i <nodes.length;i++){ nodes[i].setAttribute( "Expanded ", "True ");ExpandChildByNode(nodes[i]);}} //--> </SCRIPT>