(希望有人能回答)如何用javascript读取treeview的值和其父结点的值
用asp.net进行网页设计时,希望用javascript读取treeview的值和其父结点的值,然后放进页面的textbox中,应该怎么做啊,希望有人能回答我,谢谢了!
------解决方案--------------------function GetNodeData()
{
indexid=TreeView1.clickedNodeIndex;
var data = TreeView1.getTreeNode(indexid).getAttribute( "NodeData ");
document.getElementById( 'TB13 ').value=data;
}
------解决方案--------------------上,正解
C:\Inetpub\wwwroot\webctrl_client\1_0]\treeview.htc
里面你要属性,方法,都有
<public:component tagname=treeview literalcontent=true>
<public:attach event=oncontentready onevent= "oncontentready() " />
<public:attach event=ondocumentready onevent= "ondocumentready() " />
<public:attach event= "onscroll " onevent= "onScroll() " />
<public:event name= "onexpand " id= "_tvevtExpand " />
<public:event name= "oncollapse " id= "_tvevtCollapse " />
<public:event name= "onselectedindexchange " id= "_tvevtSelect " />
<public:event name= "oncheck " id= "_tvevtCheck " />
<public:event name= "onfirequeuedevents " id= "_tvevtFireQueuedEvents " />
<public:event name= "onnodebound " id= "_tvevtNodeBound " />
<public:event name= "onnodetypesbound " id= "_tvevtNodeTypesBound " />
<public:event name= "onhover " id= "_tvevtHover " />
<public:event name= "onunhover " id= "_tvevtUnhover " />
<public:property name= "clickedNodeIndex " GET= "getClickedNodeIndex " />
<public:property name= "defaultStyle " id= "_tvpropDefaultStyle " GET= "getDefaultStyle " PUT= "setDefaultStyle " />
<public:property name= "hoverStyle " id= "_tvpropHoverStyle " GET= "getHoverStyle " PUT= "setHoverStyle " />
<public:property name= "selectedStyle " id= "_tvpropSelectedStyle " GET= "getSelectedStyle " PUT= "setSelectedStyle " />
<public:property name= "childType " id= "_tvpropChildType " GET= "getChildType " PUT= "setChildType " />
<public:property name= "imageUrl " id= "_tvpropImageUrl " GET= "getImageUrl " PUT= "setImageUrl " />
<public:property name= "expandedImageUrl " id= "_tvpropExpandedImageUrl " GET= "getExpandedImageUrl " PUT= "setExpandedImageUrl " />
<public:property name= "selectedImageUrl " id= "_tvpropSelectedImageUrl " GET= "getSelectedImageUrl " PUT= "setSelectedImageUrl " />
<public:property name= "target " id= "_tvpropTarget " GET= "getTarget " PUT= "setTarget " />
<public:property name= "treeNodeSrc " id= "_tvpropTreeNodeSrc " GET= "getTreeNodeSrc " PUT= "setTreeNodeSrc " />
<public:property name= "treeNodeXsltSrc " id= "_tvpropTreeNodeXsltSrc " GET= "getTreeNodeXsltSrc " PUT= "setTreeNodeXsltSrc " />
<public:property name= "selectExpands " id= "_tvpropSelectExpands " GET= "getSelectExpands " PUT= "setSelectExpands " />
<public:property name= "expandLevel " id= "_tvpropExpandLevel " GET= "getExpandLevel " PUT= "setExpandLevel " />