<script lanaguage=javascript>
<!--
//////////////////////////////////////////////////////////////////////////////////////
//////获取TreeView控件的兄弟节点
//////////////////////////////////////////////////////////////////////////////////////
function GetLevleNode(Direction)
{
var SelectNode;
var BeforeStr,EndStr,NextStr,EndNum;
var k;
if(Direction=='up')
k=-1 /////////获取兄节点
else
k=1 /////////获取弟节点
var myTree=TreeList.getElementById("OrgSetTree");
var NextNode = myTree.getTreeNode((parseFloat(tvw.clickedNodeIndex) + 1) +'');
SelectNode=myTree.clickedNodeIndex;
BeforeStr=SelectNode.substr(0,SelectNode.length-1);
EndNum=parseInt(SelectNode.substr(SelectNode.length-1));
if (Direction=='up'&&EndNum<=0) return false;
EndStr=EndNum+k;
NextStr=BeforeStr+EndStr+'';
var CurrNode = myTree.getTreeNode(NextStr);
if (PreNode==null) return false;
var NextNodeText=CurrNode.getAttribute('Text'); /////////获取节点文字
alert(NextNodeText);
}
-->
</script>
本文地址:http://com.8s8s.com/it/it44625.htm