[code]<!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=gbk">
<style>
body{font-size:12px;}
a{color:#000;text-decoration:none;}
.on{float:left;width:100px;line-height:20px;color:#FFFFFF;background:#4874D0;border:#2B5CC5 1px solid;border-bottom:none;text-align:center;}
.off{float:left;width:100px;line-height:20px;border-bottom:#2B5CC5 1px solid;cursor:pointer;text-align:center;}
.tab{width:303px;margin:auto;}
.box{width:290px;margin:auto;border:#2B5CC5 1px solid;border-top:none;line-height:20px;padding:5px;}
</style>
<title>Tab - From http://master8.net/bbs/</title>
<body>
<div class="tab">
<div class="off" id="Tab_1" onclick="showTab('1');">Tab 1</div>
<div class="on" id="Tab_2" onclick="showTab('2');">Tab 2</div>
<div class="off" id="Tab_3" onclick="showTab('3');">Tab 3</div>
</div>
<div style="clear:both;"></div>
<div class="box" id="cont_1" style="display:none;">
<a href="http://www.master8.net/bbs/" target="_blank">
This is Tab 1's content<br/>
www.master8.net</a>
</div>
<div class="box" id="cont_2" style="">
<a href="http://www.master8.net/bbs/" target="_blank">
This is Tab 2's content<br/>
www.master8.net</a>
</div>
<div class="box" id="cont_3" style="display:none;">
<a href="http://www.master8.net/bbs/" target="_blank">
This is Tab 3's content<br/>
www.master8.net</a>
</div>
<script type="text/javascript">
function showTab(ID)
{
for(var i=1;i<=3;i++)
{
if(ID==i)
{
$('Tab_'+i).className='on';
$('cont_'+i).style.display='';
}
else
{
$('Tab_'+i).className='off';
$('cont_'+i).style.display='none';
}
}
}
function $(ID)
{
return document.getElementById(ID);
}
</script>
</body>
</html>[/code]