请问TreeView.htc该怎么用?

kucool 2006-04-19 02:30:07
在TreeView.htc中包含有TreeView的脚本函数,请问怎么使用这些函数?谢谢~!
...全文
185 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Compass_ 2006-05-23
  • 打赏
  • 举报
回复

see
http://topic.csdn.net/t/20041202/12/3608545.html
clare2003 2006-04-19
  • 打赏
  • 举报
回复
http://msdn.microsoft.com/library/default.asp?url=/workshop/webcontrols/behaviors/library/treeview/treeview.asp
//////////

<HTML XMLNS:mytree>
<HEAD><?IMPORT NAMESPACE="mytree" IMPLEMENTATION="treeview.htc"/>
<TITLE>TreeView Add Method</TITLE>
<LINK REL="stylesheet" HREF="/workshop/samples/samples.css" TYPE="text/css">
<SCRIPT>
function addNodeToTree(){
var newNode = oTree.createTreeNode();
newNode.setAttribute("text", "New Root Node");
oTree.add(newNode);
}
function addNodeToNode(){
var parentNode = oTree.getTreeNode("0");
var newNode = oTree.createTreeNode();
newNode.setAttribute("text", "New Child Node");
parentNode.add(newNode);
}

</SCRIPT>
</HEAD>
<BODY>
<!--TOOLBAR_START--><!--TOOLBAR_EXEMPT--><!--TOOLBAR_END-->
<H1>add Method</H1>
<P>This example shows the differences in this method when applied to the <b>TreeView</b> object and the <b>TreeNode</b> object.</P>
<BUTTON ONCLICK=addNodeToTree()>Add node to tree view</BUTTON>
<BUTTON ONCLICK=addNodeToNode()>Add node to tree node</BUTTON>
<mytree:TREEVIEW ID="oTree" >
<mytree:TREENODE TEXT="Michigan" EXPANDED="true">
<mytree:TREENODE TEXT="Detroit"/>
<mytree:TREENODE TEXT="Farmington"/>
<mytree:TREENODE TEXT="Southfield" />
</mytree:TREENODE>
<mytree:TREENODE TEXT="Washington">
<mytree:TREENODE TEXT="Bellevue"/>
<mytree:TREENODE TEXT="Redmond"/>
<mytree:TREENODE TEXT="Seattle"/>
</mytree:TREENODE>
</mytree:TREEVIEW>
<P class="viewsource">To view the source code, right-click this page and choose <B>View Source</B> from the shortcut menu that appears.</P>
<!-- Copyright -->
<A class="copyright" HREF="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top">
© 2005 Microsoft Corporation. All rights reserved. Terms of use.
</A>
</BODY>
</HTML>

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧