在两不同的框架上实现菜单全部下拉.

raygemtoffice 2002-10-07 04:11:53
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<style>
<!--
.menuover { background-color: #EAF2FD; border: 1px solid #1A71E6; cursor: hand; }
.menuout { cursor: hand; }
td,a { color: #1A71E6; font-size: 12px; font-family: 宋体; text-decoration: none }
-->
</style>
<script>
var moveStep = 15; // 移动单位
var moveTime = 10; //移动时间

function MoveMenuBox()
{
if(MenuBox.doing)
{
clearInterval(MenuBox.doing)
}

moveStep *= -1

MenuBox.doing = setInterval("DoMoveAction()",moveTime)
}
function DoMoveAction()
{
//var judger = MenuBox.style.pixelTop + moveStep;
var judger = MenuBox.style.pixelBottom + moveStep;
if(moveStep>0)
{
//if(judger <= MenuBox.parentElement.offsetHeight)
if(judger <= MenuBox.parentElement.offsetHeight)
{
// MenuBox.style.pixelTop = judger
MenuBox.style.pixelBottom = judger
}
else
{
// MenuBox.style.pixelTop = MenuBox.parentElement.offsetHeight;
MenuBox.style.pixelBottom = MenuBox.parentElement.offsetHeight;
clearInterval(MenuBox.doing);
MenuBox.doing = false;
}
}
else
{
if(judger >= 0)
{
// MenuBox.style.pixelTop = judger
MenuBox.style.pixelBottom = judger
}
else
{
// MenuBox.style.pixelTop = 0;
MenuBox.style.pixelBottom = 0;
clearInterval(MenuBox.doing);
MenuBox.doing = false;
}
}
}
</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">

<tr>
<td width="100%">

<table id="judgerBox" width=130 cellpadding="0" cellspacing="0" height="29">
<tr>
<td onclick="MoveMenuBox()" valign="middle" align="center" height="25" style="cursor: hand; background-color: #1A71E6; color: #FFFFFF; border: 1 outset #FFFFFF" width="128">控
制 按 钮</td>
</tr>
<tr>
<td valign="middle" align="center" height="4" width="128" bgcolor="#FFFFFF" style="font-size: 6px">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<div style="overflow: hidden; position:absolute; width:200px; height:300px; z-index:1;">
<table id="MenuBox" width=130 cellpadding="0" cellspacing="4" style="border: 1 solid #1A71E6;border-left: 20 solid #1A71E6; position: relative; visibility: hidden">
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >关 于 我 们</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout';>加 入 我 们</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >交 易 市 场</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >网 页 超 市</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >域 名 注 册</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >虚 拟 主 机</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >服 务 中 心</td>
</tr>
<tr>
<td valign="middle" align="center" height="20" class=menuout onmouseover=this.className='menuover'; onmouseout=this.className='menuout'; >合 作 伙 伴</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

<script>
function window.onload()
{
//MenuBox.style.pixelTop = MenuBox.parentElement.offsetHeight;
MenuBox.style.pixelBottom = MenuBox.parentElement.offsetHeight;
MenuBox.style.visibility = "visible"
}
</script>
...全文
29 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
sirlotus 2002-10-08
  • 打赏
  • 举报
回复
好像只能用控件了
方工 2002-10-07
  • 打赏
  • 举报
回复
???

87,996

社区成员

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

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