(希望有人能回答)如何用javascript读取treeview的值和其父结点的值 用asp.net进行网页设计时,希望用javascript读取treeview的值和其父结点的值,然后放进页面的textbox中,应该怎么做啊,希望有人能回答我,谢谢了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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" /> <public:property name="autoSelect" id="_tvpropAutoSelect" GET="getAutoSelect" PUT="setAutoSelect" /> <public:property name="treeNodeTypeSrc" id="_tvpropTreeNodeTypeSrc" GET="getTreeNodeTypeSrc" PUT="setTreeNodeTypeSrc" /> <public:property name="showLines" id="_tvpropShowLines" GET="getShowLines" PUT="setShowLines" /> <public:property name="showPlus" id="_tvpropShowPlus" GET="getShowPlus" PUT="setShowPlus" /> <public:property name="showToolTip" id="_tvpropShowToolTip" GET="getShowToolTip" PUT="setShowToolTip" /> <public:property name="indent" id="_tvpropIndent" GET="getIndent" PUT="setIndent" /> <public:property name="selectedNodeIndex" id="_tvpropSelectedNodeIndex" GET="getSelectedNodeIndex" PUT="setSelectedNodeIndex" /> <public:property name="systemImagesPath" id="_tvpropSystemImagesPath" GET="getSystemImagesPath" PUT="setSystemImagesPath" /> <public:method name="queueEvent" /> <public:method name="getTreeNode" /> <public:method name="addAt" /> <public:method name="createTreeNode" /> <public:method name="getTreeNodeType" /> <public:method name="createTreeNodeType" /> <public:method name="addTreeNodeType" /> <public:method name="add" /> <public:method name="databind" /> <public:method name="databindTypes" /> <public:method name="getChildren" /> </public:component> 下载别人的源码,连接字符串要怎么改? application_error和page_error Xml静态模型和动态模型区别是什么啊? 请教各位:用vs2003开发Web程序提示窗口应如何解决? FCKeditor中的内容怎么保存不进数据库呢? IE下载中文长文件名文件时出现的问题 寻找想创业的ASP.NET开发伙伴! 高手请帮帮我啊,急啊!! AspNetPager分页控件用法 DataList 和 DataGrid 的区别? 关于C#的引用&值传递弱弱的问几句. 存储过程我可以写在CS文件里吗?
{
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" />
<public:property name="autoSelect" id="_tvpropAutoSelect" GET="getAutoSelect" PUT="setAutoSelect" />
<public:property name="treeNodeTypeSrc" id="_tvpropTreeNodeTypeSrc" GET="getTreeNodeTypeSrc" PUT="setTreeNodeTypeSrc" />
<public:property name="showLines" id="_tvpropShowLines" GET="getShowLines" PUT="setShowLines" />
<public:property name="showPlus" id="_tvpropShowPlus" GET="getShowPlus" PUT="setShowPlus" />
<public:property name="showToolTip" id="_tvpropShowToolTip" GET="getShowToolTip" PUT="setShowToolTip" />
<public:property name="indent" id="_tvpropIndent" GET="getIndent" PUT="setIndent" />
<public:property name="selectedNodeIndex" id="_tvpropSelectedNodeIndex" GET="getSelectedNodeIndex" PUT="setSelectedNodeIndex" />
<public:property name="systemImagesPath" id="_tvpropSystemImagesPath" GET="getSystemImagesPath" PUT="setSystemImagesPath" />
<public:method name="queueEvent" />
<public:method name="getTreeNode" />
<public:method name="addAt" />
<public:method name="createTreeNode" />
<public:method name="getTreeNodeType" />
<public:method name="createTreeNodeType" />
<public:method name="addTreeNodeType" />
<public:method name="add" />
<public:method name="databind" />
<public:method name="databindTypes" />
<public:method name="getChildren" />
</public:component>