<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>导航</title>
<style type="text/css">
*{margin:0;padding:0;font:15px "新宋体";}
#tabs{width:70%;margin:0 auto 0}
ul{list-style:none;height:50px;border-bottom:#F60 solid 5px;padding-left:50px}
li{float:left;margin-top:20px}
a{text-decoration:none;display:block;width:120px;line-height:30px;text-align:center;background-color:#CCCCCC;margin:0 8px 1px 0;}
.on{background-color:#F60;color:#FFFFFF;height:40px;margin-top:-10px;line-height:40px}
#tabs div{height:120px;line-height:30px;border:#F60 solid 1px;padding:25px;border-top:none;}
.hide{display:none;}
</style>
<script type="text/javascript">
window.onload=function(){
var otab = document.getElementById("tabs");
var oul = document.getElementByTagName("ul")[0];
document.write("11111");
var olis = document.getElementByTagName("li");
var odivs = document.getElementByTagName("div");
for(var i=0;i<olis.length;i++){
olis[i].index=i;
olis[i].onclick=function(){
for(var n=0;n<olis.length;n++)
{
olis[n].className = "";
odivs[n].className = "hide";
}
this.className="on";
odivs[this.index].className="";
}
};
}
</script>
</head>
<body>
<div id="tabs">
<ul>
<li><a class="on" href="#">房产</a></li>
<li><a href="#">家居</a></li>
<li><a href="#">二手房</a></li>
</ul>
<div>
275万购昌平邻铁三居 总价20万买一居<br>
200万内购五环三居 140万安家东三环<br/>
北京首现零首付楼盘 53万购东5环50平<br/>
京楼盘直降5000 中信府 公园楼王现房<br/>
</div>
<div class="hide">
40平出租屋大改造 美少女的混搭小窝<br/>
经典清新简欧爱家 90平老房焕发新生<br/>
新中式的酷色温情 66平撞色活泼家居<br/>
瓷砖就像选好老婆 卫生间烟道的设计<br/>
</div>
<div class="hide">
通州豪华3居260万 二环稀缺2居250w甩<br/>
西3环通透2居290万 130万2居限量抢购<br/>
黄城根小学学区仅260万 121平70万抛!<br/>
独家别墅280万 苏州桥2居优惠价248万<br/>
</div>
</div>
</body>
</html>