| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 881 人关注过本帖
标题:多级树形目录2
取消只看楼主 加入收藏
guixiaolan
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:356
专家分:0
注 册:2006-4-20
收藏
 问题点数:0 回复次数:1 
多级树形目录2

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<script language="javascript">
function showsub(theindex)
{
var thebelowlay,thesublay,thebelowsub;
var thecurlay="lay"+theindex;
var thecurlayimg=thecurlay+"img";
var thecurlayimg1=thecurlay+"img1";
var theimgsrc=document.images[thecurlayimg].src;

if(theimgsrc.indexOf("zhedie1.gif")>0)
{
document.images[thecurlayimg].src="zhankai1.gif";
document.images[thecurlayimg1].src="zhankai.gif";
thesublay="lay"+theindex+"sub";
document.getElementById(thesublay).style.visibility='visible';
if(thecurlay!="lay4")
{
thebelowlay="lay"+(theindex+1);
document.getElementById(thesublay).style.top=document.getElementById(thebelowlay).style.top;
}
if(thecurlay=="lay4")
{
document.getElementById(thesublay).style.top=parseInt(document.getElementById(thecurlay).style.top)+18;
}
for(var i=1;i<=4-theindex;i++)
{
thebelowlay="lay"+(theindex+i);
document.getElementById(thebelowlay).style.top=parseInt(document.getElementById(thebelowlay).style.top)+document.getElementById(thesublay).clientHeight;

thebelowsub=thebelowlay+"sub";
document.getElementById(thebelowsub).style.top=parseInt(document.getElementById(thebelowsub).style.top)+document.getElementById(thesublay).clientHeight;
}
}
else if(theimgsrc.indexOf("zhankai1.gif")>0)
{
document.images[thecurlayimg].src="zhedie1.gif";
document.images[thecurlayimg1].src="zhedie.gif";

thesublay="lay"+theindex+"sub";
thebelowlay="lay"+(theindex+1);
document.getElementById(thesublay).style.visibility='hidden';
for(var i=1;i<=4-theindex;i++)
{
thebelowlay="lay"+(theindex+i);
document.getElementById(thebelowlay).style.top=parseInt(document.getElementById(thebelowlay).style.top)-document.getElementById(thesublay).clientHeight;

thebelowsub=thebelowlay+"sub";
document.getElementById(thebelowsub).style.top=parseInt(document.getElementById(thebelowsub).style.top)-document.getElementById(thesublay).clientHeight;
}
}
}
</script>

<body>
<div id="parentlay">

<div id="lay0" style="position:absolute;top:22">
<table cellspacing="0" cellpadding="0"><tr><td width="18" height="18"><img src="zhankai.gif"></td><td><a href="javascript:showsub(0)">网站入口</a></td>
</tr></table>
</div>

<div id="lay1" style="position:absolute;top:40;visibility:visible">
<table cellspacing="0" cellpadding="0">
<tr><td><img id="lay1img" src="zhedie1.gif"></td><td><img id="lay1img1" src="zhedie.gif"></td>
<td><a href="javascript:showsub(1)">网站地图</a></td>
</tr>
</table>
</div>
<div id="lay1sub" style="position:absolute;top=0px;visibility:hidden">
<table cellspacing="0" cellpadding="0">
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>1</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>2</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>3</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>4</td>
</tr>
</table>
</div>

<div id="lay2" style="position:absolute;top:58;visibility:visible">
<table cellspacing="0" cellpadding="0">
<tr><td><img id="lay2img" src="zhedie1.gif"></td><td><img id="lay2img1" src="zhedie.gif"></td>
<td><a href="javascript:showsub(2)">下载专区</a></td>
</tr>
</table>
</div>
<div id="lay2sub" style="position:absolute;top=0px;visibility:hidden">
<table cellspacing="0" cellpadding="0">
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>11</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>22</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>33</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>44</td>
</tr>
</table>
</div>

<div id="lay3" style="position:absolute;top:76;visibility:visible">
<table cellspacing="0" cellpadding="0">
<tr><td><img id="lay3img" src="zhedie1.gif"></td><td><img id="lay3img1" src="zhedie.gif"></td>
<td><a href="javascript:showsub(3)">友情链接</a></td>
</tr>
</table>
</div>
<div id="lay3sub" style="position:absolute;top=0px;visibility:hidden">
<table cellspacing="0" cellpadding="0">
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>111</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>222</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>333</td>
</tr>
<tr><td><img src="zhixian.gif"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>444</td>
</tr>
</table>
</div>

<div id="lay4" style="position:absolute;top:94;visibility:visible">
<table cellspacing="0" cellpadding="0">
<tr><td><img id="lay4img" src="zhedie1.gif"></td><td><img id="lay4img1" src="zhedie.gif"></td>
<td><a href="javascript:showsub(4)">计数器</a></td>
</tr>
</table>
</div>
<div id="lay4sub" style="position:absolute;top=0px;visibility:hidden">
<table cellspacing="0" cellpadding="0">
<tr><td width="18"></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>1111</td></tr>
<tr><td></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>2222</td></tr>
<tr><td></td><td><img src="sanjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>3333</td></tr>
<tr><td></td><td><img src="erjiao.gif"></td><td><img src="wenjian.gif"></td>
<td>4444</td></tr>
</table>
</div>

</div>
</body>
</html>

搜索更多相关主题的帖子: 树形 目录 
2006-08-13 17:23
guixiaolan
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:356
专家分:0
注 册:2006-4-20
收藏
得分:0 
为什么在这里没问题!
怎么我放到网上去就有问题了呢!
[URL=http://h.thec.cn/lovexiaoforever/2007年的文件/menu1.htm]就是这个网页,请点击这里[/URL]

[此贴子已经被作者于2006-8-13 19:36:52编辑过]


[url=http://www./]/sign/free.gif" target="_blank">http://ip./sign/free.gif[/url]
2006-08-13 19:35
快速回复:多级树形目录2
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017660 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved