js實現下拉式功能表

來源:互聯網
上載者:User

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js滑動門</title>
<style type="text/css">
div{
display:none;}
ul{
margin-left:-30px;
list-style-type:none;
margin-top:0px;
}
li{
width:80px;
background-color:#CCCCCC;
text-align:center;
display:block;
padding:4px 0px 2px 0px;
}
li a{
text-decoration:none;
color:#666;
padding:4px 0px 2px 0px;
}
li a:hover{
color:#00F;
display:block;
background-color:#FFFF00;
border-style:solid;
border-color:#009900;
border-width:2px;
}
span a:hover{
 color:#FF0;
 }
span a{
 text-decoration:none;
 }
</style>
<script language="javascript" type="text/javascript">
function show(num){
 document.getElementById(num).style.display="block";
}
function hidden1(num){
 document.getElementById(num).style.display="none";
}
</script>
</head>
<body>
<table  border="0">
  <tr>
    <td width="110px"onmousemove="show(1)" onmouseout="hidden1(1)" bgcolor="#FF99CC"><span><a href="#">第一組</a></span></td>
    <td width="110px"onmousemove="show(2)" onmouseout="hidden1(2)" bgcolor="#FF99CC"><span><a href="#">第二組</a></span></td>
    <td width="110px"onmousemove="show(3)" onmouseout="hidden1(3)"bgcolor="#FF99CC"><span><a href="#">第三組</a></span></td>
    <td width="110px"onmousemove="show(4)" onmouseout="hidden1(4)"bgcolor="#FF99CC"><span><a href="#">第四組</a></span></td>
  </tr>
  <tr>
    <td onmousemove="show(1)" onmouseout="hidden1(1)">
 <div id="1">
  <ul>
   <li><a href="#">呂志強</a></li>
   <li><a href="#">張翔宇</a></li>
   <li><a href="#">趙繼松</a></li>
   <li><a href="#">馬豔玲</a></li>
  </ul>
 </div>
 </td>
    <td onmousemove="show(2)" onmouseout="hidden1(2)">
 <div id="2">
  <ul>
   <li><a href="#">王繼超</a></li>
   <li><a href="#">武婷婷</a></li>
   <li><a href="#">趙興蕾</a></li>
   <li><a href="#">張偉</a></li>
  </ul>
 </div>
 </td>
    <td onmousemove="show(3)" onmouseout="hidden1(3)">
 <div id="3">
  <ul>
   <li><a href="#">張偉濤</a></li>
   <li><a href="#">王浩</a></li>
   <li><a href="#">張黎</a></li>
   <li><a href="#">劉丹</a></li>
  </ul>
 </div>
 </td>
    <td onmousemove="show(4)" onmouseout="hidden1(4)">
 <div id="4">
  <ul>
   <li><a href="#">戴玉碩</a></li>
   <li><a href="#">蔣公正</a></li>
   <li><a href="#">王碩</a></li>
   <li><a href="#">吳雷</a></li>
  </ul>
 </div>
 </td>
  </tr>
</table>
</body>
</html>

摘自 youngerhao的專欄

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.