大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> 其他相关 -> 用JAVASCRIPT做出WINDOWS中选项卡的效果

用JAVASCRIPT做出WINDOWS中选项卡的效果

时间: 2021-07-31 作者:daque

源码:

<html><head><title>window</title><meta http-equiv="content-type" content="text/html;charset=utf8"><style type=text/css>td {     font-size: 12px;    font-family:arial;    color: #000000;    line-height: 150%;    }.sec1 {     background-color: #eeeeee;    cursor: hand;    color: #000000;    border-left: 1px solid #ffffff;    border-top: 1px solid #ffffff;    border-right: 1px solid gray;    border-bottom: 1px solid #ffffff    }.sec2 {     background-color: #e4eaf8;    cursor: hand;    color: #000000;    border-left: 1px solid #ffffff;     border-top: 1px solid #ffffff;     border-right: 1px solid gray;     font-weight: bold;     }.main_tab {    background-color: #e4eaf8;    color: #000000;    border-left:1px solid #ffffff;    border-right: 1px solid gray;    border-bottom: 1px solid gray;     }</style>

<script language=javascript><!--    function secboard(n)  {    for(i=0; i<sectable.cells.length; i++){      sectable.cells.classname="sec1";    }    sectable.cells[n].classname="sec2";

    for(i=0; i<maintable.tbodies.length; i++){      maintable.tbodies.style.display="none";    }    maintable.tbodies[n].style.display="block";  }//--></script></head>

<body>  <table border=0 cellspacing=0 cellpadding=0 width=549 id=sectable>    <tr height=20 align=center>       <td class=sec2 width=10% onclick="secboard(0)">general information</td>      <td class=sec1 width=10% onclick="secboard(1)">team</td>      <td class=sec1 width=10% onclick="secboard(2)">documentation</td>      <td class=sec1 width=10% onclick="secboard(3)">test report</td>    </tr>  </table>  <table border=0 cellspacing=0 cellpadding=0 width=549 height=240 id=maintable class=main_tab>    <tbody style="display:block;">       <tr>         <td align=center valign=top> <br> <br> text </td>      </tr>    </tbody>    <tbody style="display:none;">       <tr>         <td align=center valign=top> <br>          <br>          text1 </td>      </tr>    </tbody>    <tbody style="display:none;">       <tr>         <td align=center valign=top> <br><br>   text2 </td>      </tr>    </tbody>    <tbody style="display:none;">       <tr>         <td align=center valign=top> <br><br>   text3 </td>      </tr>    </tbody>   </table></body></html>

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.