<!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=gb2312" />
<meta http-equiv="content-language" content="zh-cn" />
<meta name="author" content="forfor" />
<meta name="keywords" content="" />
<title> Tab Demo </title>
<script type="text/javascript">
<!--
function c(i){
var i;
document.getElementById("tab").className="tabD"+i;
window.name=i;//window.name版
}
onload=function(){
var a=document.links;
for(var i=0;i<a.length;i++)a[i].onfocus=function(){this.blur();}
}
//-->
</script>
<style type="text/css">
body,table,td,th,input,textarea,button,select{font:13px Verdana,"宋体",sans-serif;}
body{background-color:#eef;}
div#tab{width:300px;text-align:left;}
ul.tabU{
list-style: none;
margin: 0px;
padding:1px 0px 0px .5em;
}
ul.tabU li{
display: inline;
margin-right:2px;
}
ul.tabU li a{
color:black;
font-weight:bold;
line-height: 20px;
text-decoration:none;
background-image: url(http://www.vscn.net/forfor/demo/_img/tab.gif);
border:1px #BBBBBB solid;
border-bottom-width:0px;
padding:0px 5px 2px;
cursor: pointer;
}
div.tabC{
display:none;
border:1px solid;
padding:6px;
}
div.tabD1 a.tabB1,a.tabB1:hover{background-position:0 -20px;border-color:#EAAD6B;}
div.tabD1 div.tabC1{border-color:#EAAD6B;display:block;background-color:#FDEDD8;}
div.tabD2 a.tabB2,a.tabB2:hover{background-position:0 -42px;border-color:#6ECEF3;}
div.tabD2 div.tabC2{border-color:#6ECEF3;display:block;background-color:#E6F6FD;}
div.tabD3 a.tabB3,a.tabB3:hover{background-position:0 -64px;border-color:#84AC44;}
div.tabD3 div.tabC3{border-color:#84AC44;display:block;background-color:#F1F6E7;}
div.tabD4 a.tabB4,a.tabB4:hover{background-position:0 -86px;border-color:#F37CA3;}
div.tabD4 div.tabC4{border-color:#F37CA3;display:block;background-color:#FFEEF4;}
div.tabD1 a.tabB1,div.tabD2 a.tabB2,div.tabD3 a.tabB3,div.tabD4 a.tabB4{padding:1px 5px 3px;}
</style>
</head>
<body>
<center>
<div id="tab" class="tabD1">
<script type="text/javascript">
<!--
//var i=parseInt(location.hash.replace("#",""));//hash版
var i=parseInt(window.name);//window.name版
if(i)document.getElementById("tab").className="tabD"+i;
//-->
</script>
<ul class="tabU">
<li><a onclick="c(1)" href="#1" class="tabB1">tab1</a></li><li><a onclick="c(2)" href="#2" class="tabB2">tab2</a></li><li><a onclick="c(3)" href="#3" class="tabB3">tab3</a></li><li><a onclick="c(4)" href="#4" class="tabB4">tab4</a></li>
</ul>
<div class="tabC tabC1"><b>Tab Demo</b> Ver1.2(window.name)<br/>Created by forfor 2006-09-12</div>
<div class="tabC tabC2"><input value="hello"/></div>
<div class="tabC tabC3"><center><img alt="google" src="http://www.google.com/intl/en/images/logo.gif"/></center></div>
<div class="tabC tabC4">ver1.0 2005-09-09<br/>ver1.1 2005-09-14<br/>ver1.2 2006-09-12<br/><a href="javascript:void(c(0));">![](https://www.cnblogs.com/Images/dot.gif)
</a></div>
</div>
</center>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta http-equiv="content-language" content="zh-cn" />
<meta name="author" content="forfor" />
<meta name="keywords" content="" />
<title> Tab Demo </title>
<script type="text/javascript">
<!--
function c(i){
var i;
document.getElementById("tab").className="tabD"+i;
window.name=i;//window.name版
}
onload=function(){
var a=document.links;
for(var i=0;i<a.length;i++)a[i].onfocus=function(){this.blur();}
}
//-->
</script>
<style type="text/css">
body,table,td,th,input,textarea,button,select{font:13px Verdana,"宋体",sans-serif;}
body{background-color:#eef;}
div#tab{width:300px;text-align:left;}
ul.tabU{
list-style: none;
margin: 0px;
padding:1px 0px 0px .5em;
}
ul.tabU li{
display: inline;
margin-right:2px;
}
ul.tabU li a{
color:black;
font-weight:bold;
line-height: 20px;
text-decoration:none;
background-image: url(http://www.vscn.net/forfor/demo/_img/tab.gif);
border:1px #BBBBBB solid;
border-bottom-width:0px;
padding:0px 5px 2px;
cursor: pointer;
}
div.tabC{
display:none;
border:1px solid;
padding:6px;
}
div.tabD1 a.tabB1,a.tabB1:hover{background-position:0 -20px;border-color:#EAAD6B;}
div.tabD1 div.tabC1{border-color:#EAAD6B;display:block;background-color:#FDEDD8;}
div.tabD2 a.tabB2,a.tabB2:hover{background-position:0 -42px;border-color:#6ECEF3;}
div.tabD2 div.tabC2{border-color:#6ECEF3;display:block;background-color:#E6F6FD;}
div.tabD3 a.tabB3,a.tabB3:hover{background-position:0 -64px;border-color:#84AC44;}
div.tabD3 div.tabC3{border-color:#84AC44;display:block;background-color:#F1F6E7;}
div.tabD4 a.tabB4,a.tabB4:hover{background-position:0 -86px;border-color:#F37CA3;}
div.tabD4 div.tabC4{border-color:#F37CA3;display:block;background-color:#FFEEF4;}
div.tabD1 a.tabB1,div.tabD2 a.tabB2,div.tabD3 a.tabB3,div.tabD4 a.tabB4{padding:1px 5px 3px;}
</style>
</head>
<body>
<center>
<div id="tab" class="tabD1">
<script type="text/javascript">
<!--
//var i=parseInt(location.hash.replace("#",""));//hash版
var i=parseInt(window.name);//window.name版
if(i)document.getElementById("tab").className="tabD"+i;
//-->
</script>
<ul class="tabU">
<li><a onclick="c(1)" href="#1" class="tabB1">tab1</a></li><li><a onclick="c(2)" href="#2" class="tabB2">tab2</a></li><li><a onclick="c(3)" href="#3" class="tabB3">tab3</a></li><li><a onclick="c(4)" href="#4" class="tabB4">tab4</a></li>
</ul>
<div class="tabC tabC1"><b>Tab Demo</b> Ver1.2(window.name)<br/>Created by forfor 2006-09-12</div>
<div class="tabC tabC2"><input value="hello"/></div>
<div class="tabC tabC3"><center><img alt="google" src="http://www.google.com/intl/en/images/logo.gif"/></center></div>
<div class="tabC tabC4">ver1.0 2005-09-09<br/>ver1.1 2005-09-14<br/>ver1.2 2006-09-12<br/><a href="javascript:void(c(0));">
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
</div>
</center>
</body>
</html>