<title>
基于表格的tab
</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312"/>
<script language="javascript">
function tabit(id,cid) {
tabwoman.classname="taboff";
tabman.classname="taboff";
tabsport.classname="taboff";
tableisure.classname="taboff";
tabshoes.classname="taboff";
tabdecor.classname="taboff";
id.classname="tabon";
cwoman.style.display="none";
cman.style.display="none";
csport.style.display="none";
cleisure.style.display="none";
cshoes.style.display="none";
cdecor.style.display="none";
cid.style.display="block";
}
function showall() {
tabwoman.classname="tabon";
tabman.classname="tabon";
tabsport.classname="tabon";
tableisure.classname="tabon";
tabshoes.classname="tabon";
tabdecor.classname="tabon";
cwoman.style.display="block";
cman.style.display="block";
csport.style.display="block";
cleisure.style.display="block";
cshoes.style.display="block";
cdecor.style.display="block";
}
</script>
<style>
td {
font-family: "verdana";
padding:3px;
}
.tabon {
border-top: 1px solid #e3e3e3;border-left: 1px solid #e3e3e3;
color: #db5b6f;
font-weight: bold;
}
.taboff {
background-color: #f5f5f5;
border-top: 1px solid #e3e3e3;border-left: 1px solid #e3e3e3;border-bottom: 1px solid #e3e3e3;
color: #666666;
font-weight: bold;
}
.tdbody {
border-bottom: 1px solid #e3e3e3;border-right: 1px solid #e3e3e3;border-left: 1px solid #e3e3e3;
line-height:50px;
}
.tdbody2 {
border-right: 1px solid #e3e3e3;border-left: 1px solid #e3e3e3;
line-height:50px;
}
</style>
<table border="0" cellpadding="0" cellspacing="0" width="340">
<tbody>
<tr>
<td class="taboff" id="tabwoman" style="cursor:hand" onclick="tabit(tabwoman,cwoman)" align="center">
asp
</td>
<td class="taboff" id="tabman" style="cursor:hand" onclick="tabit(tabman,cman)" align="center">
php
</td>
<td class="taboff" id="tabsport" style="cursor:hand" onclick="tabit(tabsport,csport)" align="center">
asp.net
</td>
<td class="taboff" id="tableisure" style="cursor:hand" onclick="tabit(tableisure,cleisure)" align="center">
vc++
</td>
<td class="taboff" id="tabshoes" style="cursor:hand" onclick="tabit(tabshoes,cshoes)" align="center">
vb
</td>
<td class="taboff" id="tabdecor" style="cursor:hand" onclick="tabit(tabdecor,cdecor)" align="center">
ajax
</td>
</tr>
<tr id="cwoman" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">asp</a>
</td>
</tr>
<tr id="cman" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">php</a>
</td>
</tr>
<tr id="csport" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">asp.net</a>
</td>
</tr>
<tr id="cleisure" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">vc++</a>
</td>
</tr>
<tr id="cshoes" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">vb</a>
</td>
</tr>
<tr id="cdecor" style="display:none">
<td colspan="6" class="tdbody">
<a href="#">ajax</a>
</td>
</tr>
</tbody>
</table>