惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - 荆棘鸟

FSO查看文件夹 鼠标事件 《《未完》》 不间断往上滚动 超酷的日历[经典] 右下角弹出提示的代码!!!经典 屏蔽源码 效果怎么样 滑出式菜单导航栏 js翻页代码集合 [经典] 一个JS的翻页效果(翻书效果) sql常用语句 菜鸟的最爱 .NET经典代码汇总(五) 菜鸟的最爱 .NET经典代码汇总(四) 菜鸟的最爱 .NET经典代码汇总(三) 菜鸟的最爱 .NET经典代码汇总(二) 菜鸟的最爱 .NET经典代码汇总(一) 值传递 Server.Transfer与Response.Redirect页面跳转方法的区别,总合一下 .net下使用cookies
一个类似于QQ菜单的导航[经典]
荆棘鸟 · 2007-11-16 · via 博客园 - 荆棘鸟

Posted on 2007-11-16 14:57  荆棘鸟  阅读(263)  评论()    收藏  举报

<html>
<head>
<title>QQ菜单</title>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<script language='JavaScript'>
var headHeight = 22;var bodyHeight = 202;var objcount = 4;var step = 10;var moving = false;
function showme(obj1, obj2)
{
 if (moving)
  return;
 moving = true;
 for(i=0;i<document.all.tags('td').length;i++)
  if (document.all.tags('td')[i].className.indexOf('headtd') == 0)
   document.all.tags('td')[i].className = 'headtd1';
 obj2.className = 'headtd2';
 moveme(obj1);
}
function moveme(obj)
{
 idnumber = parseInt(obj.id.substr(4));
 objtop = headHeight * (idnumber - 1);
 objbuttom = bodyHeight + headHeight * (idnumber - 2);
 currenttop = parseInt(obj.style.top);
 if (currenttop >= objbuttom)
 {
  countid = 1;
  for(i=0;i<document.all.tags('div').length;i++)
   if (document.all.tags('div')[i].id == 'item'+countid+'body')
   {
    obj = document.all.tags('div')[i];
    objtop = headHeight * (countid - 1);
    if (countid == idnumber)
    {
     moveup(obj,objtop,false);
     break;
    }
    else
     moveup(obj,objtop,true);
    countid++;
   }
 }
 else if ((currenttop <= objtop) && (idnumber < objcount))
 {
  idnumber++;
  countid = objcount;
  for(i=document.all.tags('div').length-1;i>=0;i--)
   if (document.all.tags('div')[i].id == 'item'+countid+'body')
   {
    obj = document.all.tags('div')[i];
    objbuttom = bodyHeight + headHeight * (countid - 2);
    if (countid == idnumber)
    {
     movedown(obj,objbuttom,false);
     break;
    }
    else
     movedown(obj,objbuttom,true);
    countid--;
   }
 }
}
function moveup(obj,objtop,ismove)
{
 currenttop = parseInt(obj.style.top);
 if (currenttop > objtop)
 {
  obj.style.top = currenttop - step;
  setTimeout('moveup('+obj.id+','+objtop+','+ismove+')',1)
  return;
 }
 moving = ismove;
}
function movedown(obj,objbuttom,ismove)
{
 currenttop = parseInt(obj.style.top);
 if (currenttop < objbuttom)
 {
  obj.style.top = currenttop + step;
  setTimeout('movedown('+obj.id+','+objbuttom+','+ismove+')',1)
  return;
 }
 moving = ismove;
}
</script>
<style type='text/css'>
.headtd1 {  background: #00A4E1; border: 2px outset; border-color: #00BBFF #0077FF #0077FF #00BBFF; cursor: hand; font-size: 9pt}
.headtd2 {  background: #20C1FF; border: 2px outset; border-color: #60D3FF #0077FF #0077FF #60D3FF; cursor: hand; font-size: 9pt}
.bodytd  {  background: #99CCFF; border: 2px outset; border-color: #B0D8FF #0077FF #0077FF #B0D8FF; font-size: 9pt}
td{font-size:9pt}
body{font-size:9pt}
a {  font-size: 9pt; color: #0066CC; text-decoration: none}
a:hover {  font-size: 9pt; color: #990000}
</style>
</head>
<body bgcolor='#FFFFFF' text='#000000'>
<div id='mainboard' style='position:absolute; left:2px; top:2px; width:120px; height:268px; z-index:1; overflow: hidden; background: #99CCFF;'> <div id='item1body' style='position:absolute; left:0; top:0; width:120px; height:202px; z-index:2; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item1head' height='20' class='headtd2' onclick='showme(item1body,this)' align='center'>菜单1</td></tr><tr>
        <td class='bodytd' align='center'>
          <table width="99%" border="0" cellspacing="1" cellpadding="1" height="100%">
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://www.happyit8.cn" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="/">子菜单子菜单</a></td>
            </tr>
          </table>
        </td></tr></table></div><div id='item2body' style='position:absolute; left:0; top:202; width:120px; height:202px; z-index:3; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item2head' height='20' class='headtd1' onclick='showme(item2body,this)' align='center'>菜单2</td></tr><tr><td class='bodytd' align='center'>
          <table width="99%" border="0" cellspacing="1" cellpadding="1" height="100%">
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="http://happyit8" target="_blank">子菜单子菜单</a></td>
            </tr>
            <tr>
              <td bgcolor="#D9ECFF" align="center"><a href="/">子菜单子菜单</a></td>
            </tr>
          </table>
        </td></tr></table></div><div id='item3body' style='position:absolute; left:0; top:224; width:120px; height:202px; z-index:4; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item3head' height='20' class='headtd1' onclick='showme(item3body,this)' align='center'>菜单3</td></tr><tr>
        <td class='bodytd' align='center'>自己在这里随便<br>
          添加点什么都可以</td>
      </tr></table></div><div id='item4body' style='position:absolute; left:0; top:246; width:120px; height:202px; z-index:5; overflow: hidden'><table width='100%' border='0' height='100%' cellpadding='2' cellspacing='0'><tr><td id='item4head' height='20' class='headtd1' onclick='showme(item4body,this)' align='center'>菜单4</td></tr><tr>
        <td class='bodytd' align='center'>自己在这里随便<br>
          添加点什么都可以</td>
      </tr></table></div></div></body></html>