社区
JavaScript
帖子详情
我想要一棵带图形树的代码,可动态生成的。
xiaodengzi
2002-11-04 02:28:05
请将代码发到9631hua@163.com信箱中,立即加分,谢谢!
...全文
35
5
打赏
收藏
我想要一棵带图形树的代码,可动态生成的。
请将代码发到9631hua@163.com信箱中,立即加分,谢谢!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
flashsoft2000
2002-11-04
打赏
举报
回复
<%@ language="JScript"%>
<%
Response.buffer=false;
Response.Expires=0;
Server.ScriptTimeOut=5000;
var mdbpath="data/data.mdb";
var rs=Server.CreateObject("ADODB.Recordset");
var con="provider=microsoft.jet.oledb.4.0;data source="+Server.mappath(mdbpath);
%>
<head>
<style type="text/css">
body,td,a{
font-size:9pt;
color:#033865;
text-decoration:none;
}
.Tclose{
list-style-image:url("images/close.gif");
cursor:hand;
}
.Topen{
list-style-image:url("images/open.gif");
cursor:hand;
}
.TLclose{
display:none;
list-style-image:url("images/line.gif");
}
.TLopen{
list-style-image:url("images/line.gif");
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>课程目录树</title>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#f4f4f4" background="images/bg.gif">
<script language="JScript">
function AddTree(word,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.T"+id)){
var InsertTreeobj=eval("window.T"+id);
nsertTreeobj.innerHTML=word;
var InsertTreeListobj=eval("window.T"+id+"_list");
topobj.insertAdjacentHTML("beforeEnd",InsertTreeobj.outerHTML+InsertTreeListobj.outerHTML);
InsertTreeobj.outerHTML="";
InsertTreeListobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='T"+id+"' class='Tclose'>"+word+"</li></nobr><ul id='T"+id+"_list' class='TLclose'></ul>");
}
}
function AddLink(word,url,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.L"+id)){
var InsertLinkobj=eval("window.L"+id);
topobj.insertAdjacentHTML("beforeEnd",InsertLinkobj.outerHTML);
InsertLinkobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='L"+id+"'><a href='"+url+"' target='_blank'>"+word+"</a></li></nobr>");
}
}
function ChangeTree(){
var obj=event.srcElement;
var objlist=eval("window."+obj.id+"_list");
if(event.srcElement.className=="Tclose"){
obj.className="Topen";
objlist.className="TLopen";
return;
}
if(event.srcElement.className=="Topen"){
obj.className="Tclose";;
objlist.className="TLclose";
return;
}
}
</script>
<table style="position:absolute;left:-20"><tr><td>
<ul class="TLopen" id="MarkDiv" style="display:none" onclick="ChangeTree()">
<li id="T0" class="Topen">在线课程</li>
<ul id="T0_list" class="TLopen">
</td></tr></table>
<%
Response.write("<script language='JScript'>");
//==== 查找所有父树语句 ====
var sql="select * from tree where istop like '1'";
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddTree('"+rs("text")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
//==== 查找所有子树语句 ====
var sql="select * from tree where istop like '0'";//子
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddLink('"+rs("text")+"','"+rs("url")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
re=null;
Response.write("MarkDiv.style.display='';");
Response.write("</script>");
%>
</body>
</html>
flashsoft2000
2002-11-04
打赏
举报
回复
<%@ language="JScript"%>
<%
Response.buffer=false;
Response.Expires=0;
Server.ScriptTimeOut=5000;
var mdbpath="data/data.mdb";
var rs=Server.CreateObject("ADODB.Recordset");
var con="provider=microsoft.jet.oledb.4.0;data source="+Server.mappath(mdbpath);
%>
<head>
<style type="text/css">
body,td,a{
font-size:9pt;
color:#033865;
text-decoration:none;
}
.Tclose{
list-style-image:url("images/close.gif");
cursor:hand;
}
.Topen{
list-style-image:url("images/open.gif");
cursor:hand;
}
.TLclose{
display:none;
list-style-image:url("images/line.gif");
}
.TLopen{
list-style-image:url("images/line.gif");
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>课程目录树</title>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#f4f4f4" background="images/bg.gif">
<script language="JScript">
function AddTree(word,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.T"+id)){
var InsertTreeobj=eval("window.T"+id);
nsertTreeobj.innerHTML=word;
var InsertTreeListobj=eval("window.T"+id+"_list");
topobj.insertAdjacentHTML("beforeEnd",InsertTreeobj.outerHTML+InsertTreeListobj.outerHTML);
InsertTreeobj.outerHTML="";
InsertTreeListobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='T"+id+"' class='Tclose'>"+word+"</li></nobr><ul id='T"+id+"_list' class='TLclose'></ul>");
}
}
function AddLink(word,url,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.L"+id)){
var InsertLinkobj=eval("window.L"+id);
topobj.insertAdjacentHTML("beforeEnd",InsertLinkobj.outerHTML);
InsertLinkobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='L"+id+"'><a href='"+url+"' target='_blank'>"+word+"</a></li></nobr>");
}
}
function ChangeTree(){
var obj=event.srcElement;
var objlist=eval("window."+obj.id+"_list");
if(event.srcElement.className=="Tclose"){
obj.className="Topen";
objlist.className="TLopen";
return;
}
if(event.srcElement.className=="Topen"){
obj.className="Tclose";;
objlist.className="TLclose";
return;
}
}
</script>
<table style="position:absolute;left:-20"><tr><td>
<ul class="TLopen" id="MarkDiv" style="display:none" onclick="ChangeTree()">
<li id="T0" class="Topen">在线课程</li>
<ul id="T0_list" class="TLopen">
</td></tr></table>
<%
Response.write("<script language='JScript'>");
//==== 查找所有父树语句 ====
var sql="select * from tree where istop like '1'";
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddTree('"+rs("text")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
//==== 查找所有子树语句 ====
var sql="select * from tree where istop like '0'";//子
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddLink('"+rs("text")+"','"+rs("url")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
re=null;
Response.write("MarkDiv.style.display='';");
Response.write("</script>");
%>
</body>
</html>
flashsoft2000
2002-11-04
打赏
举报
回复
<%@ language="JScript"%>
<%
Response.buffer=false;
Response.Expires=0;
Server.ScriptTimeOut=5000;
var mdbpath="data/data.mdb";
var rs=Server.CreateObject("ADODB.Recordset");
var con="provider=microsoft.jet.oledb.4.0;data source="+Server.mappath(mdbpath);
%>
<head>
<style type="text/css">
body,td,a{
font-size:9pt;
color:#033865;
text-decoration:none;
}
.Tclose{
list-style-image:url("images/close.gif");
cursor:hand;
}
.Topen{
list-style-image:url("images/open.gif");
cursor:hand;
}
.TLclose{
display:none;
list-style-image:url("images/line.gif");
}
.TLopen{
list-style-image:url("images/line.gif");
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>课程目录树</title>
</head>
<body leftmargin="0" topmargin="0" bgcolor="#f4f4f4" background="images/bg.gif">
<script language="JScript">
function AddTree(word,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.T"+id)){
var InsertTreeobj=eval("window.T"+id);
nsertTreeobj.innerHTML=word;
var InsertTreeListobj=eval("window.T"+id+"_list");
topobj.insertAdjacentHTML("beforeEnd",InsertTreeobj.outerHTML+InsertTreeListobj.outerHTML);
InsertTreeobj.outerHTML="";
InsertTreeListobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='T"+id+"' class='Tclose'>"+word+"</li></nobr><ul id='T"+id+"_list' class='TLclose'></ul>");
}
}
function AddLink(word,url,id,topid){
var topobj=null;
if(!eval("window.T"+topid)){
MarkDiv.insertAdjacentHTML("beforeEnd","<li id='T"+topid+"' class='Tclose'></li><ul id='T"+topid+"_list' class='TLclose'></ul>");
}
topobj=eval("window.T"+topid+"_list");
if(eval("window.L"+id)){
var InsertLinkobj=eval("window.L"+id);
topobj.insertAdjacentHTML("beforeEnd",InsertLinkobj.outerHTML);
InsertLinkobj.outerHTML="";
}
else{
topobj.insertAdjacentHTML("beforeEnd","<nobr><li id='L"+id+"'><a href='"+url+"' target='_blank'>"+word+"</a></li></nobr>");
}
}
function ChangeTree(){
var obj=event.srcElement;
var objlist=eval("window."+obj.id+"_list");
if(event.srcElement.className=="Tclose"){
obj.className="Topen";
objlist.className="TLopen";
return;
}
if(event.srcElement.className=="Topen"){
obj.className="Tclose";;
objlist.className="TLclose";
return;
}
}
</script>
<table style="position:absolute;left:-20"><tr><td>
<ul class="TLopen" id="MarkDiv" style="display:none" onclick="ChangeTree()">
<li id="T0" class="Topen">在线课程</li>
<ul id="T0_list" class="TLopen">
</td></tr></table>
<%
Response.write("<script language='JScript'>");
//==== 查找所有父树语句 ====
var sql="select * from tree where istop like '1'";
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddTree('"+rs("text")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
//==== 查找所有子树语句 ====
var sql="select * from tree where istop like '0'";//子
rs.open(sql,con,3,3);
while(!rs.eof){
Response.write("AddLink('"+rs("text")+"','"+rs("url")+"','"+rs("id")+"','"+rs("topid")+"');");
rs.movenext();
}
rs.close();
re=null;
Response.write("MarkDiv.style.display='';");
Response.write("</script>");
%>
</body>
</html>
xiaodengzi
2002-11-04
打赏
举报
回复
还没收到。等等
wealth
2002-11-04
打赏
举报
回复
up
java源码包---java 源码 大量 实例
1个目标文件,JNDI的使用例子,有源
代码
,可以下载参考,JNDI的使用,初始化Context,它是连接JNDI
树
的起始点,查找你要的对象,打印找到的对象,关闭Context…… ftp文件传输 2个目标文件,FTP的目标是:(1)提高...
超级玛丽增强版源码
同时,为了使这些新攻击在游戏中表现得流畅自然,相应的物理和动画控制
代码
也是必不可少的。 新敌人类型的引入,无疑是对游戏AI的一次挑战。增强版源码中会包含敌人的行为模式定义和更新机制,可能通过状态机或行为...
STM32CubeMx6.4.0版本+JRE安装包
通过STM32CubeMX,开发者可以选择所需的STM32系列,然后根据项目需求配置外设、时钟
树
、GPIO引脚映射、通信接口等,
生成
的初始化
代码
可以在各种集成开发环境(IDE)中使用,如Keil MDK、IAR Embedded Workbench或GCC...
一棵
树
的
生成
树
有几颗_次小
生成
树
(
树
剖,
生成
树
)
生成
树
的概念:在一个无向图中,设顶点数为\(n\),取其中\(n-1\)条边并使所有点相连,所得到的
一棵
树
即为
生成
树
。最小
生成
树
:如果还没有接触过
生成
树
的同学,欢迎戳->最小
生成
树
详解次小
生成
树
:次小
生成
树
...
详解最小
生成
树
代码
C++
最小
生成
树
Kruscal算法和Prim算法解释,用C++实现,附详细解释
JavaScript
87,996
社区成员
224,693
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章