dt.ing a
{
background:#efefef;/*移上去的背景*/
}
dd
{
position: absolute;/*把DD流出来*/
display: none;/*把DD默认隐藏起来*/
width:280px;
background-color: #fff;
}
dd.ing
{
display: block;/*移上去的显示*/
}
dd.no
{
display:none;
}
dd#d1
{
 
;margin-top:-32px;
margin-left:120px;/*把dd移到合适的地方 #d2#d3#d4也一样*/
}
<script type="text/javascript">
var ddiShow=2;//定义一个变量来记录选中的 因为dl dd都要~为了省个变量所以
..用数字
function show(iShow)
{
document.getElementById(['d'+ddiShow]).className="no";
document.getElementById(['t'+ddiShow]).className="no";//改掉
原来的样式~隐藏起来
var iShow;
ddiShow=iShow;//把选中的的值给ddiShow 留下次用
document.getElementById(['d'+iShow]).className="ing";
document.getElementById(['t'+iShow]).className="ing";//改样式显示出来~~
return false;
}
</script>