选项卡结构代码

<script language="JavaScript" type="text/javascript">
function setFocus1(i)
{
 selectLayer1(i);
}
function selectLayer1(i)                                            
           
{
 switch(i)
 {
 case 1:
 document.getElementById("focusPic1").style.display="block";         
 document.getElementById("focusPic2").style.display="none";
 document.getElementById("focusPic1nav").style.display="block";
 document.getElementById("focusPic2nav").style.display="none";
 break;
 case 2:
 document.getElementById("focusPic1").style.display="none";
 document.getElementById("focusPic2").style.display="block";
 document.getElementById("focusPic1nav").style.display="none";
 document.getElementById("focusPic2nav").style.display="block";
 break;
 }
}
</script>
<style>
body{
margin:0px 0 0 0px;
padding:0;
width:1024px;
border:0;
background:#fff;
color:#000;
line-height:18px;
}

a{color:#000;  text-decoration:none;}
a.a_cha0:link{color:#9e9e9e; display:block; width:108px; height:27px; text-decoration:none}
a.a_cha0:visited{color:#9e9e9e; display:block; width:108px; height:27px; text-decoration:none}
a.a_cha0:hover{color:#37790D; font-weight:bold; background:#ffffff; display:block; width:108px; height:27px; text-decoration:none}

#show{ background:#E1FCC7; width:820px; height:520px; margin:0; padding:10px;}
#show_cont{ margin:0; padding:0; width:800px; height:500px; background:#fff; border:1px #BEC0D5 solid;}
.show_title{ float:left; height:28px; width:100%; background:url(http://www.cbiw.com.cn/email_z/images/bg_show_title.gif); left 0 repeat-x;}
.show_title ul{ list-style-type:none; margin:0; padding:0;}
.show_title li{float:left; width:108px; height:28px; text-align:center; border-right:1px #BEC0D5 solid;}
.show_p10{ padding-top:5px;font-size:12px;}
.show_tex{ margin:0; padding:0; float:left; width:790px; overflow:hidden; }
.show_tab{color:#37790D; font-weight:bold; background:#fff; width:108px; height:28px;}
</style>

<div id="show">
<div id="show_cont">
<div class="show_title" id="focusPic1nav" style="display: block;">
<ul>
<li class="show_tab"><div class="show_p10">标题1</div></li>
<li><a href="javascript:setFocus1(2);" target="_self" class="a_cha0"><div class="show_p10">标题2</div></a></li>
</ul>
</div>
<div class="show_title" id="focusPic2nav" style="display: none;">
<ul>
<li><a href="javascript:setFocus1(1);" target="_self" class="a_cha0"><div class="show_p10">标题1</div></a></li>
<li class="show_tab"><div class="show_p10">标题2</div></li>
</ul>
</div>
<div class="show_tex" id="focusPic1" style="display: block;">
<br>
</div>
<div class="show_tex" id="focusPic2" style="display: none;">
<br>
</div>                                   
</div>
</div>

posted @ 2009-06-16 13:54  一只白色的大鸟  阅读(200)  评论(0编辑  收藏  举报