×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

[求助]如何用表格来定位可隐藏式导航菜单(CODE 见内)

本文发表在 rolia.net 枫下论坛以下的代码是一个可隐藏式导航菜单. 但如何用TABLE来定位菜单的位置? 我将<DIV>和<SPAN>的部分放到<TABLE><TR><TD> TAG中, 此代码就不工作了. 如何改进? 谢谢了!


<html>
<head><title>Menu test</title>

<style type="text/css">
<!--
body { font-family: "&Euml;&Icirc;&Igrave;&aring;"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "&Euml;&Icirc;&Igrave;&aring;"; cursor: hand; color: #FF0033 }

-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">


<SCRIPT language=javascript><!--
function out()
{
if(window.event.toElement.id!="menu" && window.event.toElement.id!="link")
menu.style.visibility="hidden";
}
//-->

function out1()
{
if(window.event.toElement.id!="menu1" && window.event.toElement.id!="link")
menu1.style.visibility="hidden";
}
//-->
</SCRIPT>

</head>

<body>



<div id="back" onmouseout="out()"style="position:absolute;top:0;left:0;width:160;height:40;z-index:1;visibility:visible;">
<span id="menubar" onmouseover="menu.style.visibility='visible'">
<font color=red size=2> 编辑 </span>
<div border=1 id="menu" style="position:absolute;top:15;left:5;width:70;height:10;z-index:2;visibility:hidden;border:dotted green;bgcolor:grey">
<a id="link" href="http://www.microsoft.com">软件下载</a>
<a id="link" href="http://www.sohu.com">游戏下载</a>
<a id="link" href="hjsj.htm">黄金书籍</a>
<a id="link" href="mntk.htm">美女图库</a>
<a id="link" href="mp3.htm">MP3金曲</a>
<a id="link" href="flash.htm">FLASH</a>
<a id="link" href="flash.htm">FLASH</a>
<a id="link" href="flash.htm">FLASH</a>
<a id="link" href="flash.htm">FLASH</a>
<a id="link" href="flash.htm">FLASHFLASH</a>

</div>
</div>
<div id="back" onmouseout="out1()"style="position:absolute;top:0;left:80;width:160;height:40;z-index:3;visibility:visible;">
<span id="menubar" onmouseover="menu1.style.visibility='visible'">
<font color=red size=2> 帮助 </span>
<div border=1 id="menu1" style="position:absolute;top:15;left:5;width:50;height:10;z-index:4;visibility:hidden;">
<a id="link" href="rjxz.htm">软件下载</a>
<a id="link" href="yxxz.htm">游戏下载</a>
<a id="link" href="hjsj.htm">黄金书籍</a>
<a id="link" href="mntk.htm">美女图库</a>
<a id="link" href="mp3.htm">MP3金曲</a>
<a id="link" href="flash.htm">FLASH</a>
</div>
</div>

</body>
</html>更多精彩文章及讨论,请光临枫下论坛 rolia.net
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / [求助]如何用表格来定位可隐藏式导航菜单(CODE 见内)
    本文发表在 rolia.net 枫下论坛以下的代码是一个可隐藏式导航菜单. 但如何用TABLE来定位菜单的位置? 我将<DIV>和<SPAN>的部分放到<TABLE><TR><TD> TAG中, 此代码就不工作了. 如何改进? 谢谢了!


    <html>
    <head><title>Menu test</title>

    <style type="text/css">
    <!--
    body { font-family: "&Euml;&Icirc;&Igrave;&aring;"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
    A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
    A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
    a:active { font: 9pt "&Euml;&Icirc;&Igrave;&aring;"; cursor: hand; color: #FF0033 }

    -->
    </style>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">


    <SCRIPT language=javascript><!--
    function out()
    {
    if(window.event.toElement.id!="menu" && window.event.toElement.id!="link")
    menu.style.visibility="hidden";
    }
    //-->

    function out1()
    {
    if(window.event.toElement.id!="menu1" && window.event.toElement.id!="link")
    menu1.style.visibility="hidden";
    }
    //-->
    </SCRIPT>

    </head>

    <body>



    <div id="back" onmouseout="out()"style="position:absolute;top:0;left:0;width:160;height:40;z-index:1;visibility:visible;">
    <span id="menubar" onmouseover="menu.style.visibility='visible'">
    <font color=red size=2> 编辑 </span>
    <div border=1 id="menu" style="position:absolute;top:15;left:5;width:70;height:10;z-index:2;visibility:hidden;border:dotted green;bgcolor:grey">
    <a id="link" href="http://www.microsoft.com">软件下载</a>
    <a id="link" href="http://www.sohu.com">游戏下载</a>
    <a id="link" href="hjsj.htm">黄金书籍</a>
    <a id="link" href="mntk.htm">美女图库</a>
    <a id="link" href="mp3.htm">MP3金曲</a>
    <a id="link" href="flash.htm">FLASH</a>
    <a id="link" href="flash.htm">FLASH</a>
    <a id="link" href="flash.htm">FLASH</a>
    <a id="link" href="flash.htm">FLASH</a>
    <a id="link" href="flash.htm">FLASHFLASH</a>

    </div>
    </div>
    <div id="back" onmouseout="out1()"style="position:absolute;top:0;left:80;width:160;height:40;z-index:3;visibility:visible;">
    <span id="menubar" onmouseover="menu1.style.visibility='visible'">
    <font color=red size=2> 帮助 </span>
    <div border=1 id="menu1" style="position:absolute;top:15;left:5;width:50;height:10;z-index:4;visibility:hidden;">
    <a id="link" href="rjxz.htm">软件下载</a>
    <a id="link" href="yxxz.htm">游戏下载</a>
    <a id="link" href="hjsj.htm">黄金书籍</a>
    <a id="link" href="mntk.htm">美女图库</a>
    <a id="link" href="mp3.htm">MP3金曲</a>
    <a id="link" href="flash.htm">FLASH</a>
    </div>
    </div>

    </body>
    </html>更多精彩文章及讨论,请光临枫下论坛 rolia.net
    • up