社区
JavaScript
帖子详情
求一个可以控制的树。
wfqn
2004-09-17 03:36:40
类似浏览器的文件一样,可以拖放和排列顺序。
...全文
150
11
打赏
收藏
求一个可以控制的树。
类似浏览器的文件一样,可以拖放和排列顺序。
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
11 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
wfqn
2004-09-20
打赏
举报
回复
postfix2(想做浪人)
cynthia8(桔子)
ouyld(ゎたしすきぁぉた)
你们给的树只是普通的树,不能实现我要的拖动和排序。所以只能给你们5分。
yjgx007(谁是高手)
你的树可以实现拖动,但不能实现排序,所以只能给你35分了。
wfqn
2004-09-19
打赏
举报
回复
postfix2(想做浪人):那先谢谢!我弄个QQ去先。周一见!
yjgx007
2004-09-18
打赏
举报
回复
http://blog.csdn.net/yjgx007/archive/2004/09/13/102458.aspx
目前不支持排序
postfix2
2004-09-18
打赏
举报
回复
我有,不过周末不上班等星期一了你加我的QQ,我发给你
wfqn
2004-09-18
打赏
举报
回复
有没有支持拖放和排序的呢?国外的也行!能做出类似IE的整理收藏夹的功能就行。
ouyld
2004-09-18
打赏
举报
回复
第二页
<BODY>
<xml id=menuXML>
<?xml version="1.0" encoding="GB2312"?>
<DSTreeRoot text="根节点" open="true" href="http://" treeId="123">
<DSTree text="技术论坛" open="false" treeId="">
<DSTree text="5DMedia" open="false" href="http://" target="box" treeId="12">
<DSTree text="网页编码" href="http://" target="box" treeId="4353" />
<DSTree text="手绘" href="http://" target="box" treeId="543543" />
<DSTree text="灌水" href="http://" target="box" treeId="543543" />
</DSTree>
<DSTree text="BlueIdea" open="false" href="http://" target="box" treeId="213">
<DSTree text="DreamWeaver & JS" href="http://" target="box" treeId="4353" />
<DSTree text="FlashActionScript" href="http://" target="box" treeId="543543" />
</DSTree>
<DSTree text="CSDN" open="false" href="http://" target="box" treeId="432">
<DSTree text="JS" href="http://" target="box" treeId="4353" />
<DSTree text="XML" href="http://" target="box" treeId="543543" />
</DSTree>
</DSTree>
<DSTree text="资源站点" open="false" treeId="">
<DSTree text="素材屋" href="http://" target="box" treeId="12" />
<DSTree text="桌面城市" open="false" href="http://" target="box" treeId="213">
<DSTree text="壁纸" href="http://" target="box" treeId="4353" />
<DSTree text="字体" href="http://" target="box" treeId="543543" />
</DSTree>
<DSTree text="MSDN" open="false" href="http://" target="box" treeId="432">
<DSTree text="DHTML" href="http://" target="box" treeId="4353" />
<DSTree text="HTC" href="http://" target="box" treeId="543543" />
<DSTree text="XML" href="" target="box" treeId="2312" />
</DSTree>
</DSTree>
</DSTreeRoot>
</xml>
<table style="position:absolute;left:100;top:100;">
<tr><td id=treeBox style="width:400px;height:200px;border:1px solid #cccccc;padding:5 3 3 5;" valign=top></td></tr>
<tr><td style="font:10px verdana;color:#999999" align=right>by <font color=#660000>sTar</font><br/> 2003-4-8</td></tr>
</table>
</BODY>
</HTML>
ouyld
2004-09-18
打赏
举报
回复
资料 第一页
<HEAD>
<TITLE> DSTree </TITLE>
<META NAME="Author" CONTENT="sTarsjz@hotmail.com" >
<style>
body,td{font:12px verdana}
#treeBox{background-color:#fffffa;}
#treeBox .ec{margin:0 5 0 5;}
#treeBox .hasItems{font-weight:bold;height:20px;padding:3 6 0 6;margin:2px;cursor:hand;color:#555555;border:1px solid #fffffa;}
#treeBox .Items{height:20px;padding:3 6 0 6;margin:1px;cursor:hand;color:#555555;border:1px solid #fffffa;}
</style>
<base href="http://vip.5d.cn/star/dstree/" />
<script>
//code by star 20003-4-7
var HC = "color:#990000;border:1px solid #cccccc";
var SC = "background-color:#efefef;border:1px solid #cccccc;color:#000000;";
var IO = null;
function initTree(){
var rootn = document.all.menuXML.documentElement;
var sd = 0;
document.onselectstart = function(){return false;}
document.all.treeBox.appendChild(createTree(rootn,sd));
}
function createTree(thisn,sd){
var nodeObj = document.createElement("span");
var upobj = document.createElement("span");
with(upobj){
style.marginLeft = sd*10;
className = thisn.hasChildNodes()?"hasItems":"Items";
innerHTML = "<img src=expand.gif class=ec>" + thisn.getAttribute("text") +"";
onmousedown = function(){
if(event.button != 1) return;
if(this.getAttribute("cn")){
this.setAttribute("open",!this.getAttribute("open"));
this.cn.style.display = this.getAttribute("open")?"inline":"none";
this.all.tags("img")[0].src = this.getAttribute("open")?"expand.gif":"contract.gif";
}
if(IO){
IO.runtimeStyle.cssText = "";
IO.setAttribute("selected",false);
}
IO = this;
this.setAttribute("selected",true);
this.runtimeStyle.cssText = SC;
}
onmouseover = function(){
if(this.getAttribute("selected"))return;
this.runtimeStyle.cssText = HC;
}
onmouseout = function(){
if(this.getAttribute("selected"))return;
this.runtimeStyle.cssText = "";
}
oncontextmenu = contextMenuHandle;
onclick = clickHandle;
}
if(thisn.getAttribute("treeId") != null){
upobj.setAttribute("treeId",thisn.getAttribute("treeId"));
}
if(thisn.getAttribute("href") != null){
upobj.setAttribute("href",thisn.getAttribute("href"));
}
if(thisn.getAttribute("target") != null){
upobj.setAttribute("target",thisn.getAttribute("target"));
}
nodeObj.appendChild(upobj);
nodeObj.insertAdjacentHTML("beforeEnd","<br/>")
if(thisn.hasChildNodes()){
var i;
var nodes = thisn.childNodes;
var cn = document.createElement("span");
upobj.setAttribute("cn",cn);
if(thisn.getAttribute("open") != null){
upobj.setAttribute("open",(thisn.getAttribute("open")=="true"));
upobj.getAttribute("cn").style.display = upobj.getAttribute("open")?"inline":"none";
if( !upobj.getAttribute("open"))upobj.all.tags("img")[0].src ="contract.gif";
}
for(i=0;i<nodes.length;cn.appendChild(createTree(nodes[i++],sd+1)));
nodeObj.appendChild(cn);
}
else{
upobj.all.tags("img")[0].src ="endnode.gif";
}
return nodeObj;
}
window.onload = initTree;
</script>
<script>
function clickHandle(){
// your code here
}
function contextMenuHandle(){
event.returnValue = false;
var treeId = this.getAttribute("treeId");
// your code here
}
</script>
</HEAD>
wfqn
2004-09-17
打赏
举报
回复
postfix2(想做浪人):可以拖放和排序吗?要类似IE的整理收藏夹的功能哦。
wfqn
2004-09-17
打赏
举报
回复
postfix2(想做浪人):真的呀?!我上QQ不方便,发到我的Email好吗?maosong@126.com。
cynthia8
2004-09-17
打赏
举报
回复
我的电脑上有一个treemaker的工具,可以方便添加树形菜单,要的话。我的msn:wawa198267@hotmail.com
postfix2
2004-09-17
打赏
举报
回复
我有一个写好了的树,要的话说你可以加我12154280
我给你发过来
数据结构:
树
(Tree)【详解】
树
一、知识框架 二、考纲内容
树
的基本概念 二叉
树
二叉
树
的定义及其主要特征;二叉
树
的顺序存储结构和链式存储结构;二叉
树
的遍历;线索二叉
树
的基本概念和构造
树
、森林
树
的存储结构;森林与二叉
树
的转换;
树
和森林的遍历
树
与二叉
树
的应用 二叉排序
树
;平衡二叉
树
;哈夫曼
树
和哈弗编码 三、
树
的基本概念 1、
树
的定义
树
是n(n>=0)个结点的有限集。当n = 0时,称为空
树
。在任意一棵非空
树
中应满足: 有且仅有
一个
特定的称为根的结点。 当n>1时,其余节点可分为m(m>
决策
树
模型
##决策
树
模型简介 在下图中有这样
一个
问题,以下是对不同的年龄,收入等进行的采访。得到如下的表格。现在希望预测买计算机的年龄,性别等。 通过对上图的归纳可以得到以下
一个
树
,如下: 通过在这样的
一个
树
中我们可以得到不同年龄,等不同因素对于购买计算机的影响因素。这就是
一个
简单的决策
树
模型。当然不仅仅只有这
一个
图。 以上三个图采用的是不同的划分方式而已。在如下的我们如何
求
某类或者具有某些特征的结果?在上图中年龄,是否为学生,信誉等哪个在序列靠前的子
树
呢?在决策
树
中什么是最为重要的呢?当然是结点与
树
枝,在此我
理工学---算法模型---传统机器学习---
树
相关---决策
树
基于决策
树
的分类系列内容为自己学习数据挖掘的
一个
笔记 本部分内容来源《数据挖掘导论》4.3节一、决策
树
生成算法所谓决策
树
,就是
一个
类似于流程图的
树
形结构,
树
内部的每
一个
节点代表的是对
一个
属性的测试,
树
的分支代表该属性的每
一个
测试结果,而
树
的每
一个
叶子节点代表
一个
类别。
树
的最高层是就是根节点。下图即为
一个
决策
树
的示意描述,内部节点用矩形表示,叶子节点用椭圆表示。该决策
树
用于对
一个
顾客是否会在本商场购
疫情
控制
题 数据结构课设 二分+贪心+
树
上倍增+链式前向星。
疫情
控制
题 数据结构课设 二分+贪心+
树
上倍增+链式前向星。题目引言思路链式前向星二分法贪心
树
上倍增法check函数详细注释的代码 系统完善且有详细代码注释哦! 题目 H 国有 n 个城市,这 n 个城市用 n-1 条双向道路相互连通构成一棵
树
,1 号城市是首都, 也是
树
中的根节点。 H 国的首都爆发了一种危害性极高的传染病。当局为了
控制
疫情,不让疫情扩散到边境城市 (叶子节点所表示的城市),决定动用军队在一些城市建立检查点,使得从首都到边境城市 的每一条路径上都至少有
一个
检查点,边境城市也可以建立检查点。
求
逆序对(线段
树
版)
一个
序列a1,a2,a3...aN,
求
出满足:ai > aj 且 i
一个
最容易想到的方法就是枚举所有的i,j看看是否满足,显然是O(n^2)的复杂度。不够好。 可以这样考虑,开
一个
数组保存这n个数出现的位置和对应的次数,这个数组要开到a数组里最大的那个数MAX,也就是hash,初始状态数组里没有元素,每个数对应的个数都是0. 如果考虑第i个数,找到比它大的所有的数 的个数,查找的范围即
JavaScript
87,992
社区成员
224,698
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章